/* =========================================================================
   tools-shim.css
   The calculator engine (53KB of proven JS) writes a handful of legacy
   utility classnames onto result elements. Rather than edit working code,
   those exact names are mapped here onto the deco system. This file plus
   the ids in the markup ARE the engine's contract - see the 13-check
   verification suite before touching either.
   ========================================================================= */

.hidden { display: none !important; }

/* size/weight utilities the engine composes */
.text-4xl { font-family: var(--font-display); font-size: var(--t-xl); line-height: 1.05; font-variation-settings: 'opsz' 14; }
.text-xl  { font-family: var(--font-display); font-size: var(--t-md); font-weight: 460; font-variation-settings: 'opsz' 9; }
.text-sm  { font-size: var(--t-sm); }
.font-bold   { font-weight: 500; }   /* Bodoni carries weight at 500 */
.font-medium { font-weight: 500; }
.my-2 { margin-block: var(--s-2); }
.mt-1 { margin-top: var(--s-1); }

/* verdict colours, monochrome discipline:
   good = bright bone, caution = paper, bad = muted italic */
.text-green-400 { color: var(--bright); }
.text-red-400   { color: var(--text-dim); font-style: italic; }
.text-amber-400 { color: var(--text-muted); }

/* ---------- tool cards ---------- */
.tool-fields { display: grid; gap: var(--s-4); }
.tool-fields .field-row { display: grid; gap: var(--s-4); grid-template-columns: 1fr 1fr; }
@media (max-width: 26rem) { .tool-fields .field-row { grid-template-columns: 1fr; } }

.tool-result {
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-soft);
}
.tool-result .diag-row dd { font-size: var(--t-lg); }
.tool-note { font-size: var(--t-xs); color: var(--text-dim); letter-spacing: 0.04em; }

.tool-canvas {
  margin-top: var(--s-4);
  border: 1px solid var(--line-soft);
  background: var(--bg-sunken);
  padding: var(--s-3);
}
.tool-canvas canvas { width: 100% !important; height: 220px !important; }

/* the AQL flagship spans the grid */
.card-wide { grid-column: 1 / -1; }

/* verdict/insight prose the engine fills */
#cpkInsight { font-size: var(--t-sm); color: var(--text-muted); margin-top: var(--s-3); }
#cpkVerdict { letter-spacing: 0.06em; }

/* AQL plan register */
.aql-grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr 1fr; }
.aql-plan { font-size: var(--t-sm); color: var(--text-muted); }
.aql-plan strong { color: var(--text); font-weight: 500; }

/* engine toggles these two spans inside the calculate button */
#aql-btn-loading { letter-spacing: var(--track-wide); }

/* chip TOC in the hero */
.toc-chips { margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* charts that the engine unhides-then-draws stay collapsed until first data */
.card:has(.tool-result.hidden) .tool-canvas.canvas-gated { display: none; }
