/* Tools (task 035): only the tool specific pieces; fields, facts, alerts, figures and tables come from components.css
   (task 043 removed the local copies of the form and facts rules). */
.tools-page { display: grid; gap: var(--space-3); min-width: 0; }
.tools-provenance h2 { margin: 0 0 var(--space-2); font-size: var(--ph-text-lg); font-weight: 600; }
/* The parts of a result panel (the TFR taxation, advance and treasury) at the section size; the panel's h2 and the lists'
   identifier face come from the shared panel and field components (045 review round 1: classes, not elements). */
.tools-subhead { margin: var(--space-3) 0 var(--space-2); font-size: var(--ph-text-lg); }
.tools-period { margin: 0 0 var(--space-2); padding: var(--space-2) 0 0; border: 0; border-top: var(--border-w) solid var(--line); }
.tools-period > legend { font-weight: 600; }
.tools-page .table-scroll { margin-bottom: var(--space-2); }
.tools-mono { font-family: var(--font-mono); font-size-adjust: none; }
.tools-note { color: var(--ink-2); font-size: var(--ph-text-sm); max-width: var(--ph-measure); }
.tools-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.tools-card { padding: var(--space-2); background: var(--surface-1); border-radius: var(--radius-l); box-shadow: var(--shadow-1); }
.tools-card h2 { margin: 0 0 var(--space-1); font-size: var(--ph-text-lg); }
.tools-card p { margin: 0; color: var(--ink-2); }
/* Design «Segnale»: the whole card opens the tool (its title link covers it), the title in the sans of the page. */
.tools-card { position: relative; }
.tools-card:hover { box-shadow: var(--shadow-2); }
.tools-card-link { color: var(--ink); text-decoration: none; }
.tools-card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-l); }
.tools-card-link:focus-visible { outline: none; }
.tools-card:has(.tools-card-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.tools-privacy { margin-top: var(--space-2); }
.tools-optional { margin-block-end: var(--space-2); }
.tools-plain, .tools-reasons, .tools-sources { margin: 0 0 var(--space-2); padding-left: var(--space-3); }
.tools-links { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; }
.tools-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2); }
.tools-toolbar .form-field { margin-bottom: 0; }
.tools-bar { width: 8rem; height: var(--space-1); vertical-align: middle; accent-color: var(--accent); }
.tools-bar::-webkit-meter-bar { background: var(--surface-2); border: 0; border-radius: var(--radius-s); }
.tools-bar::-webkit-meter-optimum-value { background: var(--accent); border-radius: var(--radius-s); }
.tools-bar::-moz-meter-bar { background: var(--accent); }
.tools-provenance { margin-top: var(--space-3); }
/* A partial estimate is labelled in the warning role beside each affected figure (review 035 P2-1). */
.tools-partial { color: var(--warn); font-size: var(--ph-text-sm); font-weight: 600; }
/* Forced colours (task 071, components.css): the card of a tool is a card, so it keeps a visible edge where the fills and
   the shadows are gone. */
@media (forced-colors: active) {
  .tools-card { border: var(--border-w) solid; }
}
