/* The shared chart kit's stylesheet (Helper_Functions/js/dcv_charts/, docs/STATISTICS_DESIGN_2026-11.md §4):
 * the card, the tile extras, the legend keys, the svg text classes and the one tooltip.
 *
 * Colours: only the site's tokens. The reserved hues (--dcv-disordered, --dcv-ordered, --dcv-origin-*) are written
 * by the chart modules as style values; the neutrals here are Bootstrap's theme variables behind a --dcv-* name, as
 * in the theme's Tables section, so a theme switch needs no redraw. No hex and no rgb() in this file.
 * The card / tile base look (`sd-card`, `sd-kicker`, `sd-badge`, `sd-kpi`) is still Summary's statsDashboard.css.
 */

/* ---- cards: a 12-column grid, at most 2 cards per row ---- */
.mk-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .75rem; }
.mk-card { padding: .875rem 1rem .75rem; }
.mk-head { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: start; }
.mk-head h3 { font-size: 1rem; font-weight: 650; margin: 2px 0 0; line-height: 1.3; }
.mk-right { display: flex; gap: .375rem; align-items: center; }
.mk-info { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); color: var(--dcv-ink-muted, var(--bs-secondary-color)); font: italic 600 .75rem/1 Georgia, serif; cursor: pointer; }
.mk-info[aria-expanded="true"] { border-color: var(--bs-primary); color: var(--bs-body-color); }
.mk-take { font-size: .9375rem; line-height: 1.4; margin: .375rem 0 .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-take b { font-weight: 650; }
.mk-note { font-size: .75rem; color: var(--dcv-ink-muted, var(--bs-secondary-color)); background: var(--dcv-surface-muted, var(--bs-tertiary-bg)); border-radius: 6px; padding: .5rem .625rem; margin: 0 0 .375rem; }
.mk-legend { display: flex; flex-wrap: wrap; gap: .25rem .875rem; font-size: .75rem; color: var(--dcv-ink-muted, var(--bs-secondary-color)); margin-bottom: .25rem; min-height: 1.1em; }
.mk-key { display: inline-flex; align-items: center; gap: 5px; }
.mk-sw { display: inline-block; width: 10px; height: 10px; background: var(--c); }
.mk-sw.dot { border-radius: 50%; }
.mk-sw.bar { border-radius: 2px; width: 12px; height: 8px; }
.mk-sw.hollow { background: transparent; box-shadow: inset 0 0 0 2px var(--c); }
.mk-sw.diamond { width: 8px; height: 8px; transform: rotate(45deg); background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); margin: 0 1px; }
.mk-sw.tick { width: 2px; height: 12px; border-radius: 0; margin: 0 3px; }
.mk-chart { position: relative; min-height: 60px; }
.mk-empty { font-size: .8125rem; color: var(--dcv-ink-muted, var(--bs-secondary-color)); margin: .5rem 0; }
.sd-card.sd-dim .mk-chart, .sd-card.sd-dim .mk-legend { opacity: .38; transition: opacity .3s; }
.sd-card.sd-empty .mk-chart, .sd-card.sd-empty .mk-legend { display: none; }

/* ---- tiles ---- */
.mk-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.mk-kpi .l { display: flex; align-items: center; }

/* ---- svg text and the row hover of the chart modules ---- */
.mk-svg { display: block; overflow: visible; }
.mk-tick { font-size: 11px; fill: var(--dcv-ink-muted, var(--bs-secondary-color)); font-variant-numeric: tabular-nums; }
.mk-axlab { font-size: 11px; fill: var(--dcv-ink-muted, var(--bs-secondary-color)); }
.mk-rowlab { font-size: 12px; fill: var(--bs-body-color); }
.mk-rowlab.mk-rowhead { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; fill: var(--dcv-ink-muted, var(--bs-secondary-color)); }
.mk-sw.square { border-radius: 2px; }
.mk-val { font-size: 12px; fill: var(--bs-body-color); font-weight: 600; font-variant-numeric: tabular-nums; }
.mk-svg .row:hover .hit { fill: var(--dcv-surface-muted, var(--bs-tertiary-bg)) !important; }

/* ---- tooltip: values strong, labels secondary, line keys ---- */
.mk-tip { position: fixed; z-index: 1000; pointer-events: none; opacity: 0; transition: opacity .12s; background: var(--bs-body-bg); color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color); border-radius: 6px; padding: .4rem .55rem; font-size: .75rem; box-shadow: 0 4px 14px color-mix(in srgb, var(--bs-body-color) 16%, transparent); max-width: 320px; }
.mk-tip .h { font-weight: 600; margin-bottom: 2px; }
.mk-tip .r { display: grid; grid-template-columns: 12px auto 1fr; gap: 6px; align-items: center; white-space: nowrap; }
.mk-tip .r i { width: 10px; height: 2px; border-radius: 1px; }
.mk-tip .r span { color: var(--bs-secondary-color); }

/* ---- the sticky header (stickyHeader.js, strip.js): 72 px, sticks to the top of its container, a hairline shadow once stuck ---- */
.mk-sticky { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 1rem; align-items: center;
  height: 72px; padding: .375rem .875rem; margin-bottom: .875rem; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); transition: box-shadow .15s; }
.mk-sticky.is-stuck { box-shadow: 0 2px 6px color-mix(in srgb, var(--bs-body-color) 10%, transparent); }
.mk-id { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.mk-id b { font-size: 1rem; }
.mk-id span { font-size: .75rem; color: var(--dcv-ink-muted, var(--bs-secondary-color)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-stripbox { min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 1px; }
.mk-strip { height: 50px; }
.mk-strip svg { display: block; }
.mk-strip .selection { fill: var(--bs-primary); fill-opacity: .12; stroke: var(--bs-primary); }
.mk-legend.mk-striplegend { flex-wrap: nowrap; gap: .75rem; font-size: .6875rem; margin: 0; min-height: 0; white-space: nowrap; }
.mk-ctl { display: flex; gap: .5rem; align-items: center; }
.mk-ctl-slot { display: flex; gap: .5rem; align-items: center; }
.mk-chip { display: inline-flex; align-items: center; gap: .375rem; border: 1px solid var(--bs-border-color); border-radius: 999px; padding: .25rem .375rem .25rem .75rem; font-size: .8125rem; background: var(--bs-body-bg); }
.mk-chip b { font-weight: 600; }
.mk-chip button { border: 0; background: var(--dcv-surface-muted, var(--bs-tertiary-bg)); color: var(--dcv-ink-muted, var(--bs-secondary-color)); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; }
.mk-chip button[hidden] { display: none; }

/* ---- the card foot (card.js `foot`): selection note | Table | Explore, and the Table twin ---- */
.mk-foot { display: flex; gap: .75rem; align-items: center; justify-content: flex-end; border-top: 1px solid var(--dcv-chart-grid, var(--bs-border-color)); margin-top: .375rem; padding-top: .375rem; font-size: .75rem; }
.mk-foot button { border: 0; background: transparent; color: var(--dcv-ink-muted, var(--bs-secondary-color)); padding: 0; font-size: .75rem; cursor: pointer; }
.mk-foot button[aria-expanded="true"] { color: var(--bs-body-color); font-weight: 600; }
.mk-foot a { color: var(--bs-body-color); text-decoration: none; font-weight: 600; }
.mk-foot a:hover { text-decoration: underline; }
.mk-foot .mk-pick { margin-right: auto; color: var(--dcv-ink-muted, var(--bs-secondary-color)); }
.mk-twin { width: 100%; font-size: .75rem; margin-top: .25rem; border-collapse: collapse; }
.mk-twin th { font-weight: 600; color: var(--dcv-ink-muted, var(--bs-secondary-color)); text-align: left; border-bottom: 1px solid var(--dcv-chart-grid, var(--bs-border-color)); padding: 2px 6px; }
.mk-twin td { padding: 2px 6px; border-bottom: 1px solid var(--dcv-chart-grid, var(--bs-border-color)); font-variant-numeric: tabular-nums; }
.mk-twin th.n, .mk-twin td.n { text-align: right; }

/* ---- the selection (selection.js): a picked row / bin outlined, the chips and the "k of n" line ---- */
.mk-svg .row.sel .hit { fill: var(--dcv-surface-muted, var(--bs-tertiary-bg)) !important; }
.mk-svg .row.sel .mk-rowlab, .mk-svg .row.sel .mk-val { font-weight: 700; }
.mk-svg .row.sel .segs path { stroke: var(--bs-body-color); stroke-width: 1.5px; }
.mk-svg .bars path.sel { stroke: var(--bs-body-color); stroke-width: 1.5px; }
.mk-svg .row:focus-visible { outline: none; }
.mk-svg .row:focus-visible .hit { stroke: var(--bs-primary); stroke-width: 1.5px; }
.mk-svg .mk-halo { paint-order: stroke; stroke: var(--bs-body-bg); stroke-width: 3px; stroke-linejoin: round; }
.mk-svg .mk-note-col { font-size: 11px; fill: var(--dcv-ink-muted, var(--bs-secondary-color)); }
.mk-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .5rem; font-size: .8125rem; min-height: 1.75rem; }
.mk-selbar .mk-selcount { font-weight: 650; font-variant-numeric: tabular-nums; margin-right: .25rem; }
.mk-clear { border: 0; background: transparent; color: var(--dcv-ink-muted, var(--bs-secondary-color)); font-size: .8125rem; text-decoration: underline; padding: 0 .25rem; cursor: pointer; }
.mk-clear:hover { color: var(--bs-body-color); }

/* ---- the top-hits block (topHits.js) ---- */
.mk-top table { width: 100%; font-size: .75rem; border-collapse: collapse; }
.mk-top th { font-weight: 600; color: var(--dcv-ink-muted, var(--bs-secondary-color)); text-align: left; border-bottom: 1px solid var(--dcv-chart-grid, var(--bs-border-color)); padding: 2px 6px; white-space: nowrap; }
.mk-top th button { border: 0; background: transparent; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.mk-top th[aria-sort="ascending"], .mk-top th[aria-sort="descending"] { color: var(--bs-body-color); }
.mk-top td { padding: 3px 6px; border-bottom: 1px solid var(--dcv-chart-grid, var(--bs-border-color)); font-variant-numeric: tabular-nums; }
.mk-top th.n, .mk-top td.n { text-align: right; white-space: nowrap; }
.mk-top tbody tr:hover { background: var(--dcv-surface-muted, var(--bs-tertiary-bg)); }
.mk-top tr.click { cursor: pointer; }
.mk-top tr.click:focus-visible { outline: 1.5px solid var(--bs-primary); outline-offset: -1px; }
.mk-top-foot { display: flex; justify-content: space-between; gap: .75rem; font-size: .75rem; color: var(--dcv-ink-muted, var(--bs-secondary-color)); padding-top: .375rem; }
.mk-top-foot a { color: var(--bs-body-color); font-weight: 600; text-decoration: none; }
.mk-top-foot a:hover { text-decoration: underline; }
.mk-twinbox { margin-top: .25rem; }
