.tool-van-tir__grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 0.9fr;
  gap: var(--space-4);
  align-items: start;
}

.tool-van-tir__hero { display:grid; gap: var(--space-3); }

.tool-van-tir__chips { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

.pill-group { display:flex; gap:8px; flex-wrap:wrap; }
.pill { border:1px solid var(--border); border-radius: 999px; padding: 9px 12px; background:#fff; display:inline-flex; align-items:center; gap:8px; cursor:pointer; font-weight:700; }
.pill input { accent-color: var(--primary); }

.table-note { color: var(--muted); font-size:.95rem; }

.flow-table-wrapper { border:1px solid var(--border); border-radius: var(--radius); overflow:hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.flow-table-container { overflow:auto; max-height: 420px; }
.flow-table thead th { position: sticky; top:0; background: #f8fafc; z-index:2; }
.flow-table td input { background:#fff; }

.flow-empty { padding: var(--space-4); text-align:center; color: var(--muted); font-weight:700; }

.badge-list { display:flex; gap:8px; flex-wrap:wrap; }

.quick-howto { display:grid; gap:6px; padding: var(--space-3); background: rgba(15,23,42,0.04); border:1px dashed var(--border); border-radius: var(--radius); }
.quick-howto__title { margin:0; font-size:.98rem; font-weight:800; color: var(--muted); }
.quick-howto ul { margin:0; padding-left:18px; color: var(--muted); }

.chart-card { background: var(--surface); border:1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); box-shadow: var(--shadow-sm); display:grid; gap: var(--space-3); }
.chart-card h3 { margin:0; font-size:1.05rem; }
.chart-grid--three { display:grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: var(--space-4); }

.kpi-note { color: var(--muted); font-size:.95rem; margin:0; }
.kpi-actions { display:flex; gap: var(--space-2); align-items:center; justify-content:space-between; flex-wrap:wrap; }
.advanced-kpi[hidden] { display:none; }
.theory-card { grid-column: 1 / -1; }
.theory-card .tool-card__header { align-items:center; }
.theory-card .btn { white-space:nowrap; }

.btn-subtle { background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.12); }

@media (max-width: 960px){
  .tool-van-tir__grid { grid-template-columns: 1fr; }
  .flow-table-container { max-height: none; }
}

.charts-shell { background: var(--surface); border:1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm);
  padding: clamp(18px, 4vw, 28px); display:grid; gap: var(--space-4); }
.charts-shell__head { display:flex; justify-content:space-between; gap: var(--space-3); align-items:center; flex-wrap:wrap; }
.charts-shell__title { margin:0; font-size:1.15rem; }
.charts-shell__subtitle { margin:4px 0 0; color: var(--muted); }
.charts-shell__hint { margin:0; color: var(--muted); font-weight:600; }

.chart-grid--premium { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.chart-tile { background:#fff; border:1px solid var(--border); border-radius:16px; box-shadow: 0 10px 30px rgba(15,23,42,0.05);
  padding: var(--space-4); display:grid; gap: var(--space-3); }
.chart-tile__header { display:flex; justify-content:space-between; gap: var(--space-2); align-items:flex-start; }
.chart-tile__header h4 { margin:2px 0 4px; font-size:1.05rem; }
.chart-tile__header .muted { margin:0; }
.chart-tile__body { position:relative; min-height:280px; }
.chart-canvas { position:relative; height:100%; }
.chart-canvas canvas { width:100% !important; height:100% !important; }
.chart-canvas--hidden { display:none; }
.chart-empty { position:absolute; inset:0; display:grid; place-content:center; text-align:center; gap:8px; padding: var(--space-3);
  color: var(--muted); border:1px dashed var(--border); border-radius:12px; background: rgba(248,250,252,0.8); }
.chart-empty__icon { font-size:1.6rem; }
.chart-tile__footer { display:flex; align-items:center; justify-content:space-between; gap: var(--space-2); color: var(--muted); }
.chart-legend { display:flex; gap:12px; align-items:center; flex-wrap:wrap; font-size:.95rem; }
.legend-dot { width:12px; height:12px; border-radius:999px; display:inline-block; border:1px solid transparent; }
.legend-dot--positive { background: rgba(34,197,94,0.8); border-color: rgba(22,163,74,0.9); }
.legend-dot--negative { background: rgba(239,68,68,0.8); border-color: rgba(220,38,38,0.9); }
.legend-line { width:18px; height:3px; border-radius:999px; display:inline-block; }
.legend-line--primary { background: rgba(34,197,94,0.95); }
.legend-line--muted { background: rgba(15,23,42,0.7); }
.eyebrow { margin:0; font-size:.85rem; color: var(--muted); text-transform:uppercase; letter-spacing:0.05em; font-weight:700; }
.btn-icon { display:inline-flex; align-items:center; gap:6px; }

@media (max-width: 720px){
  .charts-shell__head { align-items:flex-start; }
  .chart-tile__header { flex-direction:column; }
  .chart-tile__body { min-height:260px; }
}
