/* smaltkit ui.css: styles for smaltkit/charts, smaltkit/table and smaltkit/dom.
   Everything reads --sk-* custom properties. The defaults below come from the smalt brand tokens
   (stenhoor/smalt-brand tokens.css: --text, --surface, --primary, ...), with fallbacks when those are absent.
   An app restyles the kit by setting --sk-* on any ancestor of the rendered markup. */

:where(:root) {
  --sk-font: var(--font-sans, Geist, system-ui, sans-serif);
  --sk-font-num: var(--sk-font);
  --sk-fs-label: 11px;
  --sk-fs-sub: 12px;
  --sk-fs-small: 11px;
  --sk-fs-kpi: 34px;
  --sk-text: var(--text, #151922);
  --sk-muted: var(--text-3, #5c6375);
  --sk-surface: var(--surface, #ffffff);
  --sk-border: var(--border, #d6dbe4);
  --sk-grid: color-mix(in oklab, var(--sk-border) 70%, transparent);
  --sk-gridlines: 1;
  --sk-accent: var(--primary, #003399);
  --sk-on-accent: var(--on-primary, #ffffff);
  --sk-sel: var(--sk-accent);
  --sk-pos: var(--success, #1d6b3a);
  --sk-neg: var(--danger, #a3195b);
  --sk-on-mark: #ffffff;
  --sk-bar-radius: 2;
  --sk-line-width: 2px;
  --sk-toast-bg: #151922;
  --sk-toast-text: #e9ebf0;
  /* Series colours: the Smalt report theme's palette until smalt-brand defines a chart palette. */
  --sk-c0: var(--smalt-500, #2F5BB7);
  --sk-c1: #E5622F;
  --sk-c2: #6E4BC2;
  --sk-c3: #0E7FAE;
  --sk-c4: #B07D1A;
  --sk-c5: #2E8B6E;
  --sk-c6: #C2417A;
  --sk-c7: #5C6375;
  --sk-c8: #1F5F8B;
  --sk-c9: #A33A12;
  --sk-c10: #8E6BD8;
  --sk-c11: #3F4656;
  --sk-seq-lo: color-mix(in oklab, var(--sk-accent) 8%, var(--sk-surface));
  --sk-seq-hi: var(--sk-accent);
  --sk-div-lo: var(--sk-neg);
  --sk-div-mid: var(--sk-surface);
  --sk-div-hi: var(--sk-accent);
}

/* ---------------------------------------------------------------- charts */
.sk-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--sk-muted); font-size: var(--sk-fs-sub); text-align: center; padding: 8px; }
.sk-note { font-size: var(--sk-fs-small); color: var(--sk-muted); padding: 6px 2px 0; }

.sk-c0 { --c: var(--sk-c0); } .sk-c1 { --c: var(--sk-c1); } .sk-c2 { --c: var(--sk-c2); } .sk-c3 { --c: var(--sk-c3); }
.sk-c4 { --c: var(--sk-c4); } .sk-c5 { --c: var(--sk-c5); } .sk-c6 { --c: var(--sk-c6); } .sk-c7 { --c: var(--sk-c7); }
.sk-c8 { --c: var(--sk-c8); } .sk-c9 { --c: var(--sk-c9); } .sk-c10 { --c: var(--sk-c10); } .sk-c11 { --c: var(--sk-c11); }
.sk-pos { --c: var(--sk-pos); } .sk-neg { --c: var(--sk-neg); }

.sk-chart { display: flex; flex-direction: column; height: 100%; }
.sk-chart.sk-legend-right { flex-direction: row; align-items: center; }
.sk-svg { display: block; overflow: visible; flex: 1; }
.sk-svg text { font-family: var(--sk-font); }
.sk-tick { font-size: var(--sk-fs-label); fill: var(--sk-muted); }
.sk-axis-title { font-size: var(--sk-fs-label); fill: var(--sk-muted); font-weight: 600; }
.sk-gridline { stroke: var(--sk-grid); stroke-width: 1; opacity: var(--sk-gridlines); shape-rendering: crispEdges; }
.sk-axis { stroke: color-mix(in oklab, var(--sk-muted) 45%, transparent); stroke-width: 1; shape-rendering: crispEdges; }
.sk-mark { cursor: pointer; transition: opacity 0.18s, filter 0.18s; }
.sk-bar, .sk-tile, .sk-slice, .sk-dot { fill: var(--c); }
.sk-bar { rx: calc(var(--sk-bar-radius) * 1px); }
.sk-slice { stroke: var(--sk-surface); stroke-width: 1.5; }
.sk-tile { rx: 3; }
.sk-dot { fill-opacity: 0.72; stroke: var(--c); stroke-width: 1; }
.sk-cell { rx: 2; }
.sk-line { fill: none; stroke: var(--c); stroke-width: var(--sk-line-width); stroke-linejoin: round; stroke-linecap: round; }
.sk-area { fill: var(--c); fill-opacity: 0.16; stroke: none; }
.sk-hit { fill: transparent; stroke: none; }
.sk-hit.sk-marker { fill: var(--sk-surface); stroke: var(--c); stroke-width: 2; }
.sk-hit:hover { fill: var(--c); }
.sk-connector { stroke: var(--sk-muted); stroke-dasharray: 2 2; opacity: 0.6; }
.sk-label { font-size: var(--sk-fs-label); fill: var(--sk-text); font-family: var(--sk-font-num); }
.sk-label.sk-on-mark { fill: var(--sk-on-mark); font-weight: 600; }
.sk-label.sk-sub { font-weight: 400; opacity: 0.9; }
.sk-mark:hover { filter: brightness(1.08) saturate(1.05); }
.sk-mark.sk-dim { opacity: 0.25; }
.sk-donut-total { font-size: calc(var(--sk-fs-kpi) * 0.6); font-weight: 650; fill: var(--sk-text); font-family: var(--sk-font-num); }
.sk-donut-caption { font-size: var(--sk-fs-small); fill: var(--sk-muted); }
.sk-gauge-track { fill: var(--sk-grid); }
.sk-gauge-target { stroke: var(--sk-text); stroke-width: 2.5; }
.sk-gauge-value { font-size: calc(var(--sk-fs-kpi) * 0.75); font-weight: 650; fill: var(--sk-text); font-family: var(--sk-font-num); }
.sk-gauge-track + .sk-mark { fill: var(--c); }
path.sk-mark.sk-c0:not(.sk-slice) { fill: var(--c); }

.sk-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--sk-fs-label); color: var(--sk-muted); padding: 0 0 6px; max-height: 44px; overflow: hidden; }
.sk-legend-right .sk-legend { flex-direction: column; flex-wrap: nowrap; max-height: none; overflow: auto; padding: 0 0 0 12px; max-width: 40%; }
.sk-legend-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sk-legend-item i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); flex: none; }

/* ---------------------------------------------------------------- KPI card */
.sk-kpi { display: flex; flex-direction: column; justify-content: center; height: 100%; gap: 2px; position: relative; }
.sk-kpi-value { font-family: var(--sk-font-num); font-size: var(--sk-fs-kpi); font-weight: 650; letter-spacing: -0.02em; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-kpi-caption { color: var(--sk-muted); font-size: var(--sk-fs-sub); }
.sk-kpi-cmp { font-size: var(--sk-fs-label); font-weight: 600; margin-top: 2px; }
.sk-good { color: var(--sk-pos); } .sk-bad { color: var(--sk-neg); }
.sk-spark { display: block; width: 100%; margin-top: auto; }
.sk-spark .sk-line { stroke-width: 1.5; }

.sk-table-wrap { height: 100%; overflow: auto; scrollbar-width: thin; }
.sk-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--sk-fs-sub); font-variant-numeric: tabular-nums; }
.sk-table th { position: sticky; top: 0; z-index: 1; background: var(--sk-surface); text-align: left; font-weight: 600; color: var(--sk-muted); font-size: var(--sk-fs-label); text-transform: uppercase; letter-spacing: 0.03em; padding: 6px 10px; border-bottom: 1px solid var(--sk-border); cursor: default; white-space: nowrap; }
.sk-table thead th[data-col] { cursor: pointer; }
.sk-table td { padding: 6px 10px; border-bottom: 1px solid var(--sk-grid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.sk-density-compact td { padding: 3px 8px; } .sk-density-relaxed td { padding: 10px 12px; }
.sk-table .sk-num { text-align: right; font-family: var(--sk-font-num); }
.sk-table tbody tr.sk-mark:hover td, .sk-table td.sk-mark:hover { background: color-mix(in oklab, var(--sk-accent) 7%, transparent); }
.sk-table tr.sk-on td, .sk-table td.sk-on { background: color-mix(in oklab, var(--sk-sel) 14%, transparent); }
.sk-table tfoot td, .sk-table tfoot th { position: sticky; bottom: 0; background: var(--sk-surface); font-weight: 650; border-top: 1px solid var(--sk-border); border-bottom: 0; color: var(--sk-text); text-transform: none; letter-spacing: 0; font-size: var(--sk-fs-sub); }
.sk-table td[data-bar] { background-image: linear-gradient(90deg, color-mix(in oklab, var(--sk-accent) 22%, transparent) var(--bar), transparent var(--bar)); background-repeat: no-repeat; }
.sk-matrix th.sk-rowhead { position: static; text-transform: none; letter-spacing: 0; font-size: var(--sk-fs-sub); color: var(--sk-text); border-bottom-color: var(--sk-grid); font-weight: 500; }
.sk-matrix th.sk-colhead { text-align: right; }
.sk-matrix .sk-total { font-weight: 650; background: color-mix(in oklab, var(--sk-text) 3%, var(--sk-surface)); }
.sk-matrix tbody .sk-mark { cursor: pointer; }

/* ---------------------------------------------------------------- menus, dialogs, toasts */
.sk-menu { position: fixed; z-index: 1000; min-width: 180px; background: var(--sk-surface); color: var(--sk-text); border: 1px solid var(--sk-border); border-radius: 9px; padding: 4px; box-shadow: 0 12px 32px rgba(16, 24, 40, 0.16); font: 13px var(--sk-font); }
.sk-menu-item { display: flex; justify-content: space-between; gap: 18px; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.sk-menu-item:hover:not(:disabled), .sk-menu-item:focus { background: color-mix(in oklab, var(--sk-accent) 9%, transparent); outline: none; }
.sk-menu-item:disabled { opacity: 0.4; cursor: default; }
.sk-menu-hint { opacity: 0.55; }
.sk-menu-sep { height: 1px; background: var(--sk-border); margin: 4px 2px; }
.sk-toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 1100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.sk-toast { background: var(--sk-toast-bg); color: var(--sk-toast-text); font: 13px var(--sk-font); padding: 9px 14px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); max-width: 80vw; }
.sk-toast.sk-error { background: var(--sk-neg); } .sk-toast.sk-ok { background: var(--sk-pos); }
.sk-dialog { border: 1px solid var(--sk-border); border-radius: 12px; padding: 0; width: min(520px, 94vw); max-height: 88vh; background: var(--sk-surface); color: var(--sk-text); box-shadow: 0 24px 64px rgba(16, 24, 40, 0.28); }
.sk-dialog.sk-wide { width: min(760px, 96vw); }
.sk-dialog[open] { display: flex; flex-direction: column; }
.sk-dialog::backdrop { background: rgba(15, 20, 30, 0.38); backdrop-filter: blur(2px); }
.sk-dialog-head { padding: 16px 20px 0; }
.sk-dialog-head h2 { margin: 0; font-size: 17px; }
.sk-dialog-body { padding: 14px 20px; overflow: auto; }
.sk-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--sk-border); }
.sk-dialog-foot button { background: var(--sk-surface); border: 1px solid var(--sk-border); border-radius: 7px; padding: 7px 14px; cursor: pointer; }
.sk-dialog-foot .sk-primary { background: var(--sk-accent); color: var(--sk-on-accent); border-color: var(--sk-accent); font-weight: 600; }

@media (prefers-reduced-motion: reduce) { .sk-mark { transition: none; } }

/* smaltbi report styles. Every color, font and size comes from the theme's CSS variables
   (src/theme/theme.ts), so a theme change restyles a report without re-rendering it. */

.sb-report {
  container-type: inline-size;
  position: relative;
  font-family: var(--sb-font);
  font-size: var(--sb-fs);
  color: var(--sb-text);
  background: var(--sb-page-bg, var(--sb-bg));
  padding: var(--sb-page-pad);
  min-height: 100%;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 1;
}
.sb-report *, .sb-report *::before, .sb-report *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------- page grid */
.sb-page {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-rows: var(--row);
  gap: var(--sb-gap);
  margin: 0 auto;
}
@container (max-width: 720px) {
  .sb-page { grid-template-columns: minmax(0, 1fr); }
  .sb-page > .sb-visual { grid-column: 1 / -1 !important; grid-row: auto / span var(--h, 4) !important; }
}

/* ---------------------------------------------------------------- visual frame */
.sb-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--sb-surface);
  border: var(--sb-vborder);
  border-radius: var(--sb-radius);
  box-shadow: var(--sb-shadow);
  padding: calc(var(--sb-pad) * 0.8) var(--sb-pad) var(--sb-pad);
  transition: box-shadow 0.15s, opacity 0.2s;
}
.sb-visual.sb-plain { background: transparent; border-color: transparent; box-shadow: none; padding: 2px 2px 0; }
.sb-visual-head { display: flex; align-items: flex-start; gap: 8px; min-height: 22px; margin-bottom: 6px; }
.sb-visual-head.sb-empty-head { position: absolute; right: 6px; top: 4px; min-height: 0; margin: 0; z-index: 2; }
.sb-visual-titles { flex: 1; min-width: 0; text-align: var(--sb-title-align); }
.sb-visual-title { font-family: var(--sb-font-heading); font-size: var(--sb-fs-title); font-weight: var(--sb-title-weight); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-visual-subtitle { font-size: var(--sb-fs-sub); color: var(--sb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-visual-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; opacity: 0; transition: opacity 0.15s; }
.sb-visual:hover .sb-visual-tools, .sb-visual:focus-within .sb-visual-tools, .sb-visual-tools:has(.sb-drill-level) { opacity: 1; }
.sb-tool { border: 0; background: transparent; color: var(--sb-muted); font: inherit; font-size: 14px; line-height: 1; width: 24px; height: 22px; border-radius: 5px; cursor: pointer; }
.sb-tool:hover:not(:disabled) { background: color-mix(in oklab, var(--sb-text) 8%, transparent); color: var(--sb-text); }
.sb-tool:disabled { opacity: 0.35; cursor: default; }
.sb-drill-level { font-size: var(--sb-fs-small); color: var(--sb-muted); padding: 0 4px; white-space: nowrap; }
.sb-visual-body { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.sb-visual.sb-loading .sb-visual-body { opacity: 0.55; transition: opacity 0.3s 0.15s; }
.sb-visual.sb-loading::after {
  content: ''; position: absolute; left: var(--sb-pad); right: var(--sb-pad); top: 2px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--sb-accent), transparent); background-size: 50% 100%; background-repeat: no-repeat;
  animation: sb-load 1s linear infinite;
}
@keyframes sb-load { from { background-position: -50% 0; } to { background-position: 150% 0; } }

.sb-empty, .sb-error { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--sb-muted); font-size: var(--sb-fs-sub); text-align: center; padding: 8px; }
.sb-error { color: var(--sb-neg); align-items: flex-start; justify-content: flex-start; white-space: pre-wrap; overflow: auto; font-family: ui-monospace, monospace; font-size: 11px; }

/* ---------------------------------------------------------------- charts and tables (smaltkit)
   Charts, tables, the KPI card and their legends are drawn by smaltkit and styled by its ui.css, which
   the build puts in front of this file in dist/report.css. Its --sk-* properties take the theme's values
   here; on .sb-visual too, so per-visual style overrides (--sb-* on the frame) reach the chart. */
.sb-themed, .sb-visual {
  --sk-font: var(--sb-font); --sk-font-num: var(--sb-font-num); --sk-fs-label: var(--sb-fs-label);
  --sk-fs-sub: var(--sb-fs-sub); --sk-fs-small: var(--sb-fs-small); --sk-fs-kpi: var(--sb-fs-kpi);
  --sk-text: var(--sb-text); --sk-muted: var(--sb-muted); --sk-surface: var(--sb-surface);
  --sk-border: var(--sb-border); --sk-grid: var(--sb-grid); --sk-gridlines: var(--sb-gridlines);
  --sk-accent: var(--sb-accent); --sk-sel: var(--sb-sel); --sk-pos: var(--sb-pos);
  --sk-neg: var(--sb-neg); --sk-bar-radius: var(--sb-bar-radius); --sk-line-width: var(--sb-line-width);
  --sk-seq-lo: var(--sb-seq-lo); --sk-seq-hi: var(--sb-seq-hi); --sk-div-lo: var(--sb-div-lo);
  --sk-div-mid: var(--sb-div-mid); --sk-div-hi: var(--sb-div-hi); --sk-c0: var(--sb-c0);
  --sk-c1: var(--sb-c1); --sk-c2: var(--sb-c2); --sk-c3: var(--sb-c3); --sk-c4: var(--sb-c4);
  --sk-c5: var(--sb-c5); --sk-c6: var(--sb-c6); --sk-c7: var(--sb-c7); --sk-c8: var(--sb-c8);
  --sk-c9: var(--sb-c9); --sk-c10: var(--sb-c10); --sk-c11: var(--sb-c11);
  --sk-on-mark: var(--sb-on-mark, #fff); --sk-on-accent: var(--sb-surface);
}

/* ---------------------------------------------------------------- slicers and text */
.sb-slicer { font-size: var(--sb-fs-sub); }
.sb-list { display: flex; flex-direction: column; gap: 2px; height: 100%; overflow: auto; }
.sb-list label, .sb-dropdown-list label { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 5px; cursor: pointer; }
.sb-list label:hover, .sb-dropdown-list label:hover { background: color-mix(in oklab, var(--sb-text) 5%, transparent); }
.sb-slicer input[type='checkbox'], .sb-slicer input[type='radio'] { accent-color: var(--sb-accent); margin: 0; }
.sb-chips { display: flex; flex-wrap: wrap; gap: 6px; align-content: center; height: 100%; }
.sb-chip { font: inherit; font-size: var(--sb-fs-sub); border: 1px solid var(--sb-border); background: var(--sb-surface); color: var(--sb-text); padding: 5px 12px; border-radius: 999px; cursor: pointer; transition: all 0.15s; }
.sb-chip:hover { border-color: var(--sb-accent); }
.sb-chip.sb-on { background: var(--sb-accent); border-color: var(--sb-accent); color: var(--sb-surface); }
.sb-input { font: inherit; font-size: var(--sb-fs-sub); color: var(--sb-text); background: var(--sb-surface); border: 1px solid var(--sb-border); border-radius: 6px; padding: 6px 9px; width: 100%; }
.sb-input:focus { outline: 2px solid color-mix(in oklab, var(--sb-accent) 40%, transparent); border-color: var(--sb-accent); }
.sb-range { display: flex; align-items: center; gap: 6px; }
.sb-dropdown { position: relative; }
.sb-dropdown summary { list-style: none; cursor: pointer; }
.sb-dropdown summary::after { content: '▾'; float: right; color: var(--sb-muted); }
.sb-dropdown-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto; background: var(--sb-surface); border: 1px solid var(--sb-border); border-radius: 8px; padding: 4px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.sb-visual:has(.sb-dropdown[open]) { z-index: 10; }
.sb-visual:has(.sb-dropdown) .sb-visual-body { overflow: visible; }
.sb-clear { position: absolute; right: 0; bottom: 0; font: inherit; font-size: var(--sb-fs-small); color: var(--sb-accent); background: none; border: 0; cursor: pointer; padding: 2px; }
.sb-text { height: 100%; overflow: auto; line-height: 1.5; }
.sb-text h2 { font-family: var(--sb-font-heading); font-size: calc(var(--sb-fs-title) * 1.55); margin: 0; letter-spacing: -0.01em; line-height: 1.2; }
.sb-text h3 { font-family: var(--sb-font-heading); font-size: calc(var(--sb-fs-title) * 1.2); margin: 0 0 4px; }
.sb-text h4 { font-size: var(--sb-fs-title); margin: 0 0 4px; }
.sb-text p { margin: 0 0 6px; color: var(--sb-muted); }
.sb-text a { color: var(--sb-accent); }
.sb-text-value { color: var(--sb-text); font-weight: 650; font-family: var(--sb-font-num); }
.sb-image { width: 100%; height: 100%; display: block; }

/* ---------------------------------------------------------------- tooltip, overlays, focus */
.sb-tooltip {
  position: absolute; left: 0; top: 0; z-index: 50; pointer-events: none; opacity: 0; transition: opacity 0.1s;
  background: color-mix(in oklab, var(--sb-text, #111) 92%, transparent); color: var(--sb-surface, #fff);
  font-family: var(--sb-font, system-ui); font-size: 12px; border-radius: 8px; padding: 8px 10px; min-width: 140px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); backdrop-filter: blur(4px);
}
.sb-tooltip.sb-show { opacity: 1; }
.sb-tooltip div { display: flex; justify-content: space-between; gap: 16px; line-height: 1.55; }
.sb-tooltip span { opacity: 0.75; }
.sb-tooltip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.sb-overlay { position: absolute; inset: var(--sb-page-pad); z-index: 40; background: var(--sb-surface); border: var(--sb-vborder); border-radius: var(--sb-radius); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18); display: flex; flex-direction: column; padding: var(--sb-pad); }
.sb-overlay-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.sb-overlay-head b { flex: 1; font-size: var(--sb-fs-title); }
.sb-overlay-head button, .sb-back, .sb-focus-close { font: inherit; font-size: var(--sb-fs-sub); border: 1px solid var(--sb-border); background: var(--sb-surface); color: var(--sb-text); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.sb-sql { flex: 1; overflow: auto; margin: 0; font-size: 12px; line-height: 1.5; background: color-mix(in oklab, var(--sb-text) 4%, var(--sb-surface)); border-radius: 6px; padding: 12px; white-space: pre-wrap; }
.sb-visual.sb-focus { position: absolute; inset: var(--sb-page-pad); z-index: 30; }
.sb-focus-close { align-self: flex-start; margin-bottom: 8px; }
.sb-drillbar { display: flex; align-items: center; gap: 12px; margin-bottom: var(--sb-gap); color: var(--sb-muted); font-size: var(--sb-fs-sub); }

@media print {
  .sb-report { padding: 0; background: #fff; }
  .sb-visual { break-inside: avoid; box-shadow: none; }
  .sb-visual-tools, .sb-tooltip { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .sb-visual, .sb-chip { transition: none; }
  .sb-visual.sb-loading::after { animation: none; }
}

/* ---------------------------------------------------------------- viewer chrome (published reports) */
.sbv-body { margin: 0; min-height: 100vh; background: var(--sb-bg, #f5f6f8); color: var(--sb-text, #151922); font-family: var(--sb-font, Geist, system-ui, sans-serif); }
.sbv-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: color-mix(in oklab, var(--sb-surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--sb-border); }
.sbv-title { display: flex; align-items: center; gap: 9px; font-family: var(--sb-font-heading); font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; max-width: 32vw; }
.sbv-name { overflow: hidden; text-overflow: ellipsis; }
.sbv-mark { display: inline-flex; flex: none; line-height: 0; }
.sbv-mark img { width: 22px; height: 22px; }
.sbv-mark-dark { display: none; }
@media (prefers-color-scheme: dark) {
  body:not([data-mode=light]) .sbv-mark-light { display: none; }
  body:not([data-mode=light]) .sbv-mark-dark { display: inline; }
}
body[data-mode=dark] .sbv-mark-light { display: none; }
body[data-mode=dark] .sbv-mark-dark { display: inline; }
.sbv-mode { display: inline-flex; align-items: center; gap: 6px; }
.sbv-mode svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
.sbv-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.sbv-tab { font: inherit; font-size: 13px; color: var(--sb-muted); background: none; border: 0; padding: 7px 12px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.sbv-tab:hover { color: var(--sb-text); background: color-mix(in oklab, var(--sb-text) 6%, transparent); }
.sbv-tab.sbv-on { color: var(--sb-accent); background: color-mix(in oklab, var(--sb-accent) 11%, transparent); font-weight: 600; }
.sbv-actions { display: flex; gap: 6px; margin-left: auto; }
.sbv-btn { font: inherit; font-size: 12px; color: var(--sb-text); background: var(--sb-surface); border: 1px solid var(--sb-border); border-radius: 7px; padding: 6px 10px; cursor: pointer; white-space: nowrap; }
.sbv-btn:hover { border-color: var(--sb-accent); }
.sbv-host { position: relative; }
.sbv-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 70vh; color: #5c6375; font: 14px Geist, system-ui, sans-serif; text-align: center; padding: 20px; }
.sbv-failed h2 { color: #151922; margin: 0; }
.sbv-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #d6e0f3; border-top-color: #003399; animation: sbv-spin 0.8s linear infinite; }
@keyframes sbv-spin { to { transform: rotate(360deg); } }
@media (max-width: 720px) { .sbv-bar { flex-wrap: wrap; padding: 8px 12px; } .sbv-tabs { order: 3; flex-basis: 100%; } .sbv-title { max-width: 60vw; } }

/* Menus, dialogs and toasts come from smaltkit's ui.css too. */

/* ---------------------------------------------------------------- "Powered by" badge (stenhoor/smalt-brand) */
/* 28 px tall with at least 8 px of space around it; the dark variant on dark grounds only. */
.sbv-foot { display: flex; justify-content: flex-end; padding: 8px 20px 16px; }
.sbv-badge { display: inline-block; line-height: 0; padding: 0; border-radius: 4px; }
.sbv-badge img { height: 28px; width: auto; }
.sbv-badge-dark { display: none; }
@media (prefers-color-scheme: dark) {
  body:not([data-mode=light]) .sbv-badge-light { display: none; }
  body:not([data-mode=light]) .sbv-badge-dark { display: inline; }
}
body[data-mode=dark] .sbv-badge-light { display: none; }
body[data-mode=dark] .sbv-badge-dark { display: inline; }
@media print { .sbv-foot { display: none; } }
