/* Gráficas: vista Gráfica, tarjeta del chat y panel de configuración. Colores = paleta de 40 de base.css
   (`.ch-h0…9` fija el tono, `.cl0…3` la intensidad); todo cambia solo con el tema claro/oscuro. */

:root {
  --chart-grid: color-mix(in srgb, var(--border) 75%, transparent);
  --chart-axis: var(--text-3);
  --chart-tip-bg: color-mix(in srgb, var(--surface) 93%, transparent);
  --chart-dim: 0.3;
}

/* ------------------------------------------------------------------------------------------------ Color */
.cs { --cm: 1; }
.cs.ch-h9 { --cm: 0.12; }
.cl0 { --c: oklch(var(--ch-l0) calc(var(--ch-c0) * var(--cm)) var(--h)); }
.cl1 { --c: oklch(var(--ch-l1) calc(var(--ch-c1) * var(--cm)) var(--h)); }
.cl2 { --c: oklch(var(--ch-l2) calc(var(--ch-c2) * var(--cm)) var(--h)); }
.cl3 { --c: oklch(var(--ch-l3) calc(var(--ch-c3) * var(--cm)) var(--h)); }

/* ------------------------------------------------------------------------------------------------ Vista */
.chart-view { display: flex; height: 100%; min-height: 0; background: var(--surface); }
.chart-pane { position: relative; flex: 1; min-width: 0; min-height: 0; padding: var(--space-4) var(--space-5) var(--space-5); overflow: auto; }
.chart-config { width: 336px; flex: none; border-left: 1px solid var(--border); background: var(--surface); overflow-y: auto; }
@media (max-width: 720px) {
  .chart-view.with-config { flex-direction: column; }
  .chart-view.with-config .chart-pane { flex: none; height: 62%; min-height: 260px; }
  .chart-config { width: auto; flex: 1; border-left: 0; border-top: 1px solid var(--border); }
  .chart-pane { padding: var(--space-3); }
}

.chart { display: flex; flex-direction: column; gap: var(--space-3); height: 100%; min-height: 220px; margin: 0; color: var(--text); }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.chart-titles { min-width: 0; }
.chart-title { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-strong); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.chart-subtitle { margin: 2px 0 0; color: var(--text-3); font-size: var(--text-sm); }
.chart-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.chart-actions .btn { margin-left: var(--space-2); }
.chart-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.chart-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.chart-body[data-legend="top"] { flex-direction: column-reverse; }
.chart-body[data-legend="right"] { flex-direction: row; }
.chart-main { flex: 1; min-height: 0; min-width: 0; position: relative; }
/* Línea y área llegan a los bordes: aire para que no se corten las etiquetas de los extremos. */
.chart[data-kind="line"] .chart-main, .chart[data-kind="area"] .chart-main { padding: 0 20px; }

.chart-stage { position: relative; width: 100%; height: 100%; min-height: 120px; outline: none; border-radius: var(--radius-md); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.chart-stage:focus-visible { box-shadow: var(--focus); }
.chart-stage.drillable { cursor: pointer; }
.chart-svg { display: block; overflow: visible; }
.chart-svg text { font-family: var(--font); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart.compact .chart-svg text { font-size: 10px; }

/* Rejilla, ejes y cursor */
.chart .grid path { fill: none; stroke: var(--chart-grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .baseline { fill: none; stroke: var(--border-strong); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis-label { fill: var(--chart-axis); }
.chart .axis-label.strong { fill: var(--text-2); font-weight: var(--weight-medium); }
.chart .cursor { fill: none; stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .band { fill: var(--text); opacity: 0.05; }
.chart .goal { fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-dasharray: 6 4; }
.chart .goal-label { fill: var(--text-2); font-weight: var(--weight-medium); }
.chart .val { fill: var(--text-2); font-weight: var(--weight-medium); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.chart .val.inside { fill: #fff; stroke: rgb(0 0 0 / 28%); stroke-width: 2.5px; }

/* Marcas */
.chart .mk { transition: opacity var(--fast) var(--ease); }
.chart .mk.dim { opacity: var(--chart-dim); }
.chart .mk.glow { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--c) 55%, transparent)); }
.chart .mk.outline { stroke: var(--c); stroke-width: 1.5; }
.chart .mk-pat { opacity: 0.55; pointer-events: none; }
.chart .pat-ink { stroke: #fff; }
.chart .pat-dot { fill: #fff; }
.chart .mk.line { fill: none; stroke: var(--c); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.chart .mk.area-line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: var(--surface); stroke: var(--c); stroke-width: 2; }
.chart .dot.solo { fill: var(--c); }
.chart .active-dot { fill: var(--c); stroke: var(--surface); stroke-width: 2.5; filter: drop-shadow(0 1px 3px rgb(0 0 0 / 28%)); }
.chart .sector-g { transition: transform 160ms var(--ease); }
.chart .mk.sector { stroke: var(--surface); stroke-width: 1; }
.chart .funnel-row { transition: opacity var(--fast) var(--ease); }
.chart .funnel-row.dim { opacity: var(--chart-dim); }
.chart .funnel-value { fill: var(--text); font-weight: var(--weight-strong); font-size: 13px; }
.chart .donut-value { fill: var(--text); font-weight: var(--weight-strong); }
.chart .donut-caption { fill: var(--text-3); font-size: 11px; }
.chart .radial-track { fill: var(--surface-3); }
.chart .mk.radial-bar { fill: var(--c); }
.chart .radial.over .mk.radial-bar { fill: var(--success); }

/* ------------------------------------------------------------------------------------------------ Tooltip */
.chart-tip {
  position: absolute; z-index: 5; min-width: 150px; max-width: 280px; padding: var(--space-2) var(--space-3);
  border: 1px solid color-mix(in srgb, var(--border-strong) 55%, transparent); border-radius: var(--radius-md);
  background: var(--chart-tip-bg); box-shadow: var(--shadow-md); pointer-events: none; font-size: var(--text-sm);
  backdrop-filter: blur(8px) saturate(1.2); -webkit-backdrop-filter: blur(8px) saturate(1.2);
  animation: chart-tip-in 90ms var(--ease);
}
.chart-tip.flip { transform: translateX(-100%); }
@keyframes chart-tip-in { from { opacity: 0; } }
.tip-head { margin-bottom: 4px; font-weight: var(--weight-strong); color: var(--text); }
.tip-rows { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.tip-rows li { display: flex; align-items: center; gap: var(--space-2); transition: opacity var(--fast) var(--ease); }
.tip-rows li.dim { opacity: 0.5; }
.tip-swatch { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.tip-swatch.line { height: 3px; border-radius: 2px; }
.tip-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.tip-value { font-weight: var(--weight-strong); font-variant-numeric: tabular-nums; }
.tip-share { color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.tip-more { margin-top: 2px; color: var(--text-3); font-size: var(--text-xs); }
.tip-foot { margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--border); color: var(--text-3); font-size: var(--text-xs); }

/* ------------------------------------------------------------------------------------------------ Leyenda */
.chart-legend { display: flex; flex-wrap: wrap; gap: 2px var(--space-2); justify-content: center; margin: 0; padding: 0; list-style: none; flex: none; }
.chart-body[data-legend="right"] .chart-legend { flex-direction: column; flex-wrap: nowrap; justify-content: center; max-width: 34%; overflow-y: auto; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 8px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-2); font: inherit; font-size: var(--text-sm); cursor: pointer; transition: opacity var(--fast) var(--ease), background var(--fast) var(--ease); }
.legend-item:hover { background: var(--surface-2); }
.legend-item:focus-visible { outline: none; box-shadow: var(--focus); }
.legend-item[aria-pressed="false"] { opacity: 0.45; }
.legend-item[aria-pressed="false"] .legend-label { text-decoration: line-through; }
.legend-swatch { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legend-swatch.line { height: 3px; border-radius: 2px; width: 14px; }
.legend-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------------------------------------ Estados */
.chart-state { display: grid; place-items: center; align-content: center; gap: var(--space-2); height: 100%; min-height: 160px; padding: var(--space-6); text-align: center; color: var(--text-2); }
.chart-state p { max-width: 46ch; margin: 0; color: var(--text-3); font-size: var(--text-sm); line-height: 1.5; }
.chart-state strong { color: var(--text); font-weight: var(--weight-strong); }
.chart-state .btn { margin-top: var(--space-2); }
.chart-state-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-text); }
.chart-empty-art { width: 120px; height: 56px; fill: var(--surface-3); stroke: var(--border-strong); stroke-width: 1.5; stroke-dasharray: 3 3; }
.chart-empty-art path { fill: none; }

.chart-skeleton { position: relative; display: grid; grid-template-rows: auto 1fr; gap: var(--space-4); height: 100%; min-height: 220px; padding: var(--space-5); overflow: hidden; }
.sk-head { width: 38%; height: 18px; border-radius: var(--radius-sm); background: var(--surface-3); }
.sk-bars { display: flex; align-items: flex-end; gap: 4%; padding: 0 var(--space-4); border-bottom: 1px solid var(--border); }
.sk-bars i { flex: 1; border-radius: 6px 6px 0 0; background: var(--surface-3); }
.chart-skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, var(--surface) 70%, transparent) 50%, transparent 65%); transform: translateX(-100%); animation: chart-sweep 1.4s var(--ease) infinite; }
@keyframes chart-sweep { to { transform: translateX(100%); } }

/* ------------------------------------------------------------------------------------------------ KPI */
.kpi { container-type: inline-size; display: grid; align-content: center; gap: var(--space-2); height: 100%; min-height: 150px; padding: var(--space-2) var(--space-1); outline: none; border-radius: var(--radius-md); }
.kpi:focus-visible { box-shadow: var(--focus); }
.kpi.drillable { cursor: pointer; }
.kpi-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.kpi-value { font-size: clamp(34px, 15cqw, 84px); font-weight: var(--weight-strong); line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-value.tint { color: var(--c); }
.kpi-meta { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.kpi-delta { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: var(--weight-strong); font-variant-numeric: tabular-nums; animation: kpi-delta-in 500ms 250ms var(--ease) both; }
.kpi-delta.good { background: var(--success-soft); color: var(--success); }
.kpi-delta.bad { background: var(--danger-soft); color: var(--danger); }
.kpi-delta.neutral { background: var(--surface-3); color: var(--text-2); }
.kpi-arrow { font-size: 9px; }
@keyframes kpi-delta-in { from { opacity: 0; transform: translateY(4px); } }
.kpi-compare, .kpi-window { color: var(--text-3); font-size: var(--text-sm); }
.kpi-spark { position: relative; height: 64px; margin-top: var(--space-2); }
.kpi-spark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.kpi-spark .spark-area { fill: color-mix(in srgb, var(--c) 14%, transparent); stroke: none; }
.kpi-spark .spark-line { fill: none; stroke: var(--c); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.spark-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--surface), 0 0 10px color-mix(in srgb, var(--c) 55%, transparent); }

/* ------------------------------------------------------------------------------------------------ Tabla dinámica */
.pivot-wrap { height: 100%; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
.pivot { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--text-sm); }
.pivot th, .pivot td { padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.pivot thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--text-2); font-weight: var(--weight-medium); text-align: left; }
.pivot tbody th, .pivot tfoot th { position: sticky; left: 0; background: var(--surface); text-align: left; font-weight: var(--weight-medium); }
.pivot .num { text-align: right; font-variant-numeric: tabular-nums; }
.pivot td { background: color-mix(in srgb, var(--accent) calc(var(--w, 0) * 22%), transparent); }
.pivot .total { background: var(--surface-2); font-weight: var(--weight-strong); }
.pivot tfoot th, .pivot tfoot td { border-top: 2px solid var(--border-strong); border-bottom: 0; background: var(--surface-2); font-weight: var(--weight-strong); }
.pivot td.nav { cursor: pointer; }
.pivot td.nav:hover { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Tabla alternativa visible */
.chart-table-view { flex: 1; min-height: 0; overflow: auto; }
.chart-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.chart-table caption { padding: var(--space-2) 0; text-align: left; color: var(--text-3); }
.chart-table th, .chart-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.chart-table td { font-variant-numeric: tabular-nums; }
.chart-table thead th { background: var(--surface-2); font-weight: var(--weight-medium); }

/* ------------------------------------------------------------------------------------------------ Registros (drill-down) */
.chart-drill { position: absolute; top: 0; right: 0; bottom: 0; z-index: 10; display: flex; flex-direction: column; width: min(380px, 100%); border-left: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-lg); animation: chart-drill-in var(--fast) var(--ease); }
@keyframes chart-drill-in { from { transform: translateX(24px); opacity: 0; } }
.drill-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2); padding: var(--space-4) var(--space-3) var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.drill-titles { display: grid; gap: 2px; min-width: 0; }
.drill-title { font-size: var(--text-md); font-weight: var(--weight-strong); overflow-wrap: anywhere; }
.drill-count { color: var(--text-3); font-size: var(--text-sm); }
.drill-body { flex: 1; min-height: 0; overflow-y: auto; padding: var(--space-2); }
.drill-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.drill-row { display: grid; gap: 2px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-md); background: transparent; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.drill-row:hover, .drill-row:focus-visible { background: var(--surface-2); outline: none; }
.drill-name { font-weight: var(--weight-medium); overflow-wrap: anywhere; }
.drill-values { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--text-3); font-size: var(--text-xs); }
.drill-more { margin: var(--space-3); color: var(--text-3); font-size: var(--text-sm); }
.drill-foot { display: flex; justify-content: flex-end; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); }
@media (max-width: 720px) { .chart-drill { width: 100%; } }

/* Pantalla completa */
.dialog.chart-full { width: min(1240px, 96vw); height: min(820px, 90vh); max-height: none; }
.chart-full-body { flex: 1; min-height: 0; padding: var(--space-4) var(--space-5) var(--space-5); }

/* ------------------------------------------------------------------------------------------------ Tarjeta del chat */
.agent-charts { display: grid; gap: var(--space-3); margin-bottom: var(--space-3); }
.agent-chart { margin: 0; padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.agent-chart .chart { height: auto; min-height: 0; gap: var(--space-2); }
.agent-chart .chart .chart-title { font-size: var(--text-md); }
.agent-chart .chart-main { flex: none; height: 220px; }
.agent-chart .chart-body[data-legend="right"] { flex-direction: column; }
.agent-chart .chart-body[data-legend="right"] .chart-legend { flex-direction: row; flex-wrap: wrap; max-width: none; }
.agent-chart .kpi { min-height: 120px; }
.agent-chart .chart-state { min-height: 120px; padding: var(--space-4); }
.agent-chart-foot { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.agent-chart-saved { display: inline-flex; align-items: center; gap: 5px; color: var(--success); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.agent-chart-reason { color: var(--text-3); font-size: var(--text-xs); }

/* ------------------------------------------------------------------------------------------------ Configuración */
.cfg { display: grid; align-content: start; gap: var(--space-1); padding: 0 var(--space-4) var(--space-6); font-size: var(--text-sm); }
.cfg-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; margin: 0 calc(var(--space-4) * -1); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4); background: var(--surface); border-bottom: 1px solid var(--border); }
.cfg-missing { margin: var(--space-3) 0 0; }
.cfg-section { display: grid; gap: var(--space-2); padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.cfg-section:last-child { border-bottom: 0; }
.cfg-section h4 { margin: 0; color: var(--text-3); font-size: var(--text-xs); font-weight: var(--weight-strong); letter-spacing: 0.06em; text-transform: uppercase; }
.cfg-sub { margin: var(--space-2) 0 0; color: var(--text-2); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.cfg-hint { margin: 0; color: var(--text-3); font-size: var(--text-xs); line-height: 1.5; }
.cfg-row { display: grid; grid-template-columns: 128px 1fr; align-items: center; gap: var(--space-2); min-height: 30px; }
.cfg-label { color: var(--text-2); }
.cfg-control { min-width: 0; display: flex; align-items: center; gap: var(--space-2); }
.cfg-control .input:not(.short) { width: 100%; }
.cfg .seg { flex-wrap: wrap; }
.cfg .seg-item { padding: 0 8px; }
.cfg-toggle { height: 28px; }
.cfg-range { width: 100%; accent-color: var(--accent); }
.cfg-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.cfg-kind { display: grid; justify-items: center; gap: 4px; padding: 8px 4px 6px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text-2); font: inherit; font-size: var(--text-xs); cursor: pointer; transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease), color var(--fast) var(--ease); }
.cfg-kind:hover { background: var(--surface-2); color: var(--text); }
.cfg-kind[aria-checked="true"] { border-color: var(--accent); background: var(--accent-softer); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent); }
.cfg-kind:focus-visible { outline: none; box-shadow: var(--focus); }
.cfg-thumb { width: 44px; height: 30px; }
.cfg-series { display: grid; gap: var(--space-2); }
.cfg-serie { display: grid; gap: 6px; padding: var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); }
.cfg-serie-main, .cfg-serie-extra { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cfg-serie .input { width: 100%; }
.cfg-rules { display: grid; gap: 6px; }
.cfg-rule { display: flex; align-items: center; gap: 6px; }
.cfg-swatch { width: 22px; height: 22px; padding: 0; border: 2px solid var(--surface); border-radius: 50%; background: var(--c, var(--surface-3)); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; flex: none; }
.cfg-swatch.auto { background: conic-gradient(from 90deg, #4d94ff, #29c4a9, #e5b73a, #f0805a, #d86bb0, #4d94ff); }
.cfg-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.cfg-colors { display: grid; gap: var(--space-2); padding: var(--space-2); min-width: 0; }
.cfg-palette { display: grid; grid-template-columns: repeat(10, 22px); gap: 5px; }

@media (prefers-reduced-motion: reduce) {
  .chart-tip, .chart-drill, .kpi-delta { animation: none; }
  .chart .mk, .chart .sector-g, .legend-item { transition: none; }
  .chart-skeleton::after { animation: none; }
}

/* En pantalla completa el título ya está en la cabecera del diálogo. */
.chart-full-body .chart-head { display: none; }

/* Masu Studio en el chat de Masu (ui/studio_card.rs) */
.agent-studios { display: grid; gap: var(--space-3); margin-bottom: var(--space-3); }
.agent-studio { margin: 0; padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); display: grid; gap: var(--space-2); }
.agent-studio-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); font-size: var(--text-sm); }
.agent-studio-kind { color: var(--text-muted); }
.agent-studio-status { margin-left: auto; font-size: var(--text-xs); padding: 1px 8px; border-radius: 999px; background: var(--surface-2, var(--border)); }
.agent-studio-status[data-status="done"] { color: var(--success, inherit); }
.agent-studio-status[data-status="failed"] { color: var(--danger, inherit); }
.agent-studio-progress { display: grid; gap: var(--space-1); font-size: var(--text-xs); color: var(--text-muted); }
.agent-studio-progress progress { width: 100%; height: 6px; accent-color: var(--accent); }
.agent-studio-error { margin: 0; color: var(--danger, inherit); font-size: var(--text-sm); }
.agent-studio-video { display: block; width: 100%; max-height: 420px; border-radius: var(--radius-md); background: #000; object-fit: contain; }
.agent-studio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: var(--space-2); }
.agent-studio-grid[data-count="1"] { grid-template-columns: minmax(0, 260px); }
.agent-studio-grid img, .agent-studio-strip img { display: block; width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border); }
.agent-studio-strip { display: flex; gap: var(--space-2); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-1); }
.agent-studio-strip a { flex: 0 0 132px; scroll-snap-align: start; }
.agent-studio-foot { display: flex; gap: var(--space-2); }
