/* ==========================================================================
   BRIDGEVANTI CRM — Base + Components
   Depends on tokens.css. Class prefix-free for readability; all scoped
   under the app root (.bv) so WordPress markup can't leak in.
   ========================================================================== */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body.bv {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
.bv h1, .bv h2, .bv h3, .bv h4 {
  font-family: var(--font-display);
  color: var(--color-text);
  margin: 0;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
}
.bv h1 { font-size: var(--text-3xl); font-weight: var(--weight-black); letter-spacing: -0.02em; }
.bv h2 { font-size: var(--text-xl);  font-weight: var(--weight-bold); }
.bv h3 { font-size: var(--text-lg);  font-weight: var(--weight-bold); }
.bv h4 { font-size: var(--text-md);  font-weight: var(--weight-bold); }
.bv p { margin: 0; }
.bv a { color: var(--color-link); text-decoration: none; }
.bv a:hover { text-decoration: underline; text-underline-offset: 2px; }
.bv :focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }
.bv .num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.bv .muted { color: var(--color-text-muted); }
.bv .subtle { color: var(--color-text-subtle); }
.bv .eyebrow {
  font-size: var(--text-2xs); font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--color-text-muted);
}
.bv .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 22px; height: 22px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--color-surface); --btn-fg: var(--color-text); --btn-bd: var(--color-border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 40px; padding: 0 var(--space-4);
  border: 1px solid var(--btn-bd); border-radius: var(--radius-md);
  background: var(--btn-bg); color: var(--btn-fg);
  font: var(--weight-semi) var(--text-md)/1 var(--font-body);
  cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { --btn-bg: var(--color-surface-sunk); }
.bv a.btn, .bv a.btn:hover { color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-primary { --btn-bg: var(--color-primary); --btn-fg: var(--bv-cream-200); --btn-bd: var(--color-primary); box-shadow: var(--shadow-xs); }
.btn-primary:hover { --btn-bg: var(--color-primary-hover); --btn-bd: var(--color-primary-hover); }
.btn-accent { --btn-bg: var(--color-accent); --btn-fg: var(--bv-forest-950); --btn-bd: var(--color-accent); box-shadow: var(--shadow-xs); }
.btn-accent:hover { --btn-bg: var(--color-accent-hover); --btn-bd: var(--color-accent-hover); }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--color-text-muted); }
.btn-ghost:hover { --btn-bg: var(--color-surface-sunk); --btn-fg: var(--color-text); }
.btn-danger { --btn-bg: var(--color-surface); --btn-fg: var(--color-danger); --btn-bd: #E6C3BB; }
.btn-danger:hover { --btn-bg: var(--color-danger-bg); }
.btn-sm { min-height: 32px; padding: 0 var(--space-3); font-size: var(--text-sm); border-radius: var(--radius-sm); }
.btn-lg { min-height: 48px; padding: 0 var(--space-6); font-size: var(--text-lg); }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: var(--text-sm); font-weight: var(--weight-semi); color: var(--bv-ink-700); }
.label .req { color: var(--color-danger); margin-left: 2px; }
.help { font-size: var(--text-xs); color: var(--color-text-muted); }
.error-text { font-size: var(--text-xs); color: var(--color-danger); font-weight: var(--weight-medium); }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 0 var(--space-3);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--color-text);
  font: var(--weight-regular) var(--text-md)/1.4 var(--font-body);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.textarea { padding: var(--space-3); min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--bv-ink-300); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--bv-ink-300); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--bv-gold-600); box-shadow: var(--shadow-focus); }
.input.is-invalid { border-color: var(--color-danger); }
.select {
  appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2366716B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input-group { position: relative; display: flex; align-items: center; }
.input-group .icon { position: absolute; left: 12px; color: var(--color-text-subtle); pointer-events: none; }
.input-group .input { padding-left: 38px; }
.form-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }

/* Checkbox / switch */
.check { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; font-size: var(--text-md); }
.check input { width: 18px; height: 18px; accent-color: var(--bv-forest-700); }
.switch { position: relative; display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; font-size: var(--text-sm); font-weight: var(--weight-medium); }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 38px; height: 22px; border-radius: var(--radius-pill); background: var(--bv-ink-300); position: relative; transition: background var(--dur-base) var(--ease); flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--dur-base) var(--ease); }
.switch input:checked + .track { background: var(--bv-forest-600); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: var(--shadow-focus); }

/* ---------- Chips: selectable tags (multi-select) & segmented (single) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 var(--space-3);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-pill);
  background: var(--color-surface); color: var(--bv-ink-700);
  font: var(--weight-medium) var(--text-sm)/1 var(--font-body);
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: all var(--dur-fast) var(--ease);
}
.chip:hover { border-color: var(--bv-ink-400); }
.chip .chip-check { width: 14px; height: 14px; display: none; }
.chip[aria-pressed="true"], .chip.is-selected {
  background: var(--bv-forest-900); border-color: var(--bv-forest-900); color: var(--bv-cream-200);
}
.chip[aria-pressed="true"] .chip-check, .chip.is-selected .chip-check { display: block; color: var(--bv-gold-500); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--color-surface-sunk); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.seg button {
  min-height: 34px; padding: 0 var(--space-3); border: 0; border-radius: 7px; background: transparent;
  font: var(--weight-semi) var(--text-sm)/1 var(--font-body); color: var(--color-text-muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.seg button[aria-pressed="true"] { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm); }
.seg.seg-block { display: flex; width: 100%; }
.seg.seg-block button { flex: 1; justify-content: center; }

/* ---------- Badges ---------- */
.badge {
  --b-fg: var(--bv-ink-700); --b-bg: var(--color-surface-sunk); --b-bd: var(--color-border);
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border: 1px solid var(--b-bd); border-radius: var(--radius-pill);
  background: var(--b-bg); color: var(--b-fg);
  font: var(--weight-semi) var(--text-xs)/1 var(--font-body); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.no-dot::before { display: none; }
/* Status groups */
.badge[data-status="new"]                { --b-fg: #3B4741; --b-bg: #F1EFEA; --b-bd: #E2DED4; }
.badge[data-status="contacted"],
.badge[data-status="attempted"]          { --b-fg: #2F5D7C; --b-bg: #E8F0F6; --b-bd: #D2E1EC; }
.badge[data-status="connected"],
.badge[data-status="interested"]         { --b-fg: #22593F; --b-bg: #E6F0EA; --b-bd: #CFE2D7; }
.badge[data-status="followup"]           { --b-fg: #8A5D0F; --b-bg: #FBF0D9; --b-bd: #F1DDB2; }
.badge[data-status="appointment"],
.badge[data-status="proposal"]           { --b-fg: #6E5820; --b-bg: #F6EFDD; --b-bd: #E8DAB4; }
.badge[data-status="customer"]           { --b-fg: var(--bv-gold-300); --b-bg: var(--bv-forest-900); --b-bd: var(--bv-forest-900); }
.badge[data-status="not_interested"],
.badge[data-status="not_fit"],
.badge[data-status="unresponsive"]       { --b-fg: #7A817D; --b-bg: #F3F2EF; --b-bd: #E4E2DC; }
/* Sources */
.badge[data-source="salesnav"]  { --b-fg: var(--src-salesnav);  --b-bg: var(--src-salesnav-bg);  --b-bd: transparent; }
.badge[data-source="instagram"] { --b-fg: #7D6526;               --b-bg: var(--src-instagram-bg); --b-bd: transparent; }
.badge[data-source="d2d"]       { --b-fg: #46606F;               --b-bg: var(--src-d2d-bg);       --b-bd: transparent; }
.badge[data-source="coldemail"] { --b-fg: #614B75;               --b-bg: var(--src-coldemail-bg); --b-bd: transparent; }
.badge[data-source="coldcall"]  { --b-fg: #8A4F36;               --b-bg: var(--src-coldcall-bg);  --b-bd: transparent; }

/* Inactive-today source strip */
.inactive-sources { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-3) var(--space-4);
  border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface-sunk); }
.inactive-sources .lbl { font-size: var(--text-xs); font-weight: var(--weight-semi); color: var(--color-text-muted); margin-right: auto; }
.activate { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 36px; padding: 0 var(--space-3) 0 var(--space-2);
  border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-surface); cursor: pointer;
  font: var(--weight-semi) var(--text-sm)/1 var(--font-body); color: var(--bv-ink-700); }
.activate:hover { border-color: var(--bv-gold-500); }
.activate .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.activate small { font-weight: var(--weight-medium); color: var(--color-text-subtle); }
.badge-square { border-radius: var(--radius-xs); }

/* Opportunity tag (outlined, no dot) */
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-xs);
  background: var(--bv-gold-50); border: 1px solid var(--bv-gold-100); color: var(--bv-gold-700);
  font: var(--weight-semi) var(--text-2xs)/1 var(--font-body); letter-spacing: .01em; white-space: nowrap; }

/* Temperature: subtle 3-bar meter + label */
.temp { display: inline-flex; align-items: center; gap: 6px; font: var(--weight-semi) var(--text-xs)/1 var(--font-body); color: var(--t, var(--temp-cold)); }
.temp .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.temp .bars i { width: 3px; border-radius: 1px; background: currentColor; opacity: .22; }
.temp .bars i:nth-child(1) { height: 5px; } .temp .bars i:nth-child(2) { height: 8px; } .temp .bars i:nth-child(3) { height: 12px; }
.temp[data-temp="cold"] { --t: var(--temp-cold); } .temp[data-temp="cold"] .bars i:nth-child(-n+1) { opacity: 1; }
.temp[data-temp="warm"] { --t: var(--temp-warm); } .temp[data-temp="warm"] .bars i:nth-child(-n+2) { opacity: 1; }
.temp[data-temp="hot"]  { --t: var(--temp-hot);  } .temp[data-temp="hot"]  .bars i { opacity: 1; }

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.card-pad { padding: var(--space-5); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-border-soft); }
.card-header h2, .card-header h3 { font-size: var(--text-md); font-weight: var(--weight-bold); }
.card-header .sub { font-size: var(--text-xs); color: var(--color-text-muted); }
.card-body { padding: var(--space-5); }
.card-footer { padding: var(--space-3) var(--space-5); border-top: 1px solid var(--color-border-soft); display: flex; justify-content: flex-end; gap: var(--space-2); }

/* KPI tile */
.stat { display: grid; gap: 6px; padding: var(--space-4) var(--space-5); position: relative; }
.stat .stat-label { display: flex; align-items: center; gap: 6px; font-size: var(--text-xs); font-weight: var(--weight-semi); color: var(--color-text-muted); }
.stat .stat-label .icon { width: 15px; height: 15px; color: var(--bv-gold-600); }
.stat .stat-value { font-family: var(--font-display); font-weight: var(--weight-black); font-size: var(--text-3xl); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .stat-meta { font-size: var(--text-xs); color: var(--color-text-subtle); }
.stat.is-alert .stat-value { color: var(--color-danger); }
.stat.is-alert .stat-label .icon { color: var(--color-danger); }

/* ---------- Progress: target with min–max range ---------- */
.progress { position: relative; height: 10px; border-radius: var(--radius-pill); background: var(--color-surface-sunk); overflow: visible; }
.progress .fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--p-color, var(--bv-forest-600)); transition: width var(--dur-base) var(--ease); }
.progress .range { position: absolute; top: 0; bottom: 0; border-radius: 0 var(--radius-pill) var(--radius-pill) 0; background: repeating-linear-gradient(135deg, rgba(194,164,90,.0) 0 4px, rgba(194,164,90,.28) 4px 6px); }
.progress .marker { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--bv-ink-700); border-radius: 1px; }
.progress.is-complete .fill { background: var(--p-color, var(--bv-forest-600)); box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 3px var(--bv-gold-500); }

/* ---------- List rows (cards, not wide tables) ---------- */
.list { display: grid; }
.row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-5); min-height: 60px;
  border-top: 1px solid var(--color-border-soft); color: inherit; text-decoration: none !important;
  transition: background var(--dur-fast) var(--ease);
}
.row:first-child { border-top: 0; }
a.row:hover, button.row:hover { background: var(--bv-cream-100); }
.row .row-title { font-weight: var(--weight-semi); color: var(--color-text); line-height: 1.3; }
.row .row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 3px; }
.row .row-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--bv-ink-300); }
.row .row-end { display: flex; align-items: center; gap: var(--space-2); }

/* Avatar / monogram */
.avatar { width: 36px; height: 36px; border-radius: var(--radius-md); display: grid; place-items: center; flex: none;
  background: var(--bv-cream-200); color: var(--bv-forest-700); border: 1px solid var(--bv-cream-300);
  font: var(--weight-bold) var(--text-sm)/1 var(--font-display); }
.avatar.round { border-radius: 50%; }

/* Due-date pill */
.due { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); font-weight: var(--weight-semi); color: var(--color-text-muted); white-space: nowrap; }
.due.is-overdue { color: var(--color-danger); }
.due.is-today { color: var(--color-warning); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--color-border); overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; min-height: 42px; padding: 0 var(--space-3); border: 0; background: none; cursor: pointer;
  font: var(--weight-semi) var(--text-sm)/1 var(--font-body); color: var(--color-text-muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--color-text); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--bv-gold-500); border-radius: 2px; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--color-surface-sunk); color: var(--bv-ink-700); font: var(--weight-bold) var(--text-2xs)/1 var(--font-body); }
.count.is-danger { background: var(--color-danger-bg); color: var(--color-danger); }
.count.is-warning { background: var(--color-warning-bg); color: var(--color-warning); }

/* ---------- Table (desktop only; cards on mobile) ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--text-sm); }
.table th { text-align: left; padding: 10px var(--space-4); background: var(--bv-cream-100); color: var(--color-text-muted);
  font-size: var(--text-2xs); font-weight: var(--weight-semi); letter-spacing: var(--tracking-caps); text-transform: uppercase; border-bottom: 1px solid var(--color-border); }
.table td { padding: 12px var(--space-4); border-bottom: 1px solid var(--color-border-soft); vertical-align: middle; }
.table tr:hover td { background: var(--bv-cream-100); }

/* ---------- Overlays: modal + bottom sheet ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(7, 29, 19, .42); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center; padding: var(--space-4); }
.overlay.is-open { display: flex; }
.modal { width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--color-surface);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-5) var(--space-6) var(--space-3); }
.modal-body { padding: var(--space-2) var(--space-6) var(--space-5); display: grid; gap: var(--space-5); }
.modal-footer { position: sticky; bottom: 0; display: flex; gap: var(--space-2); justify-content: flex-end; padding: var(--space-4) var(--space-6);
  background: var(--color-surface); border-top: 1px solid var(--color-border-soft); }
@media (max-width: 767px) {
  .overlay { align-items: flex-end; padding: 0; }
  .modal { width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 94dvh; }
  .modal::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--bv-ink-300); margin: 8px auto 0; }
  .modal-header { padding: var(--space-3) var(--space-5) var(--space-2); }
  .modal-body { padding: var(--space-2) var(--space-5) var(--space-5); }
  .modal-footer { padding: var(--space-3) var(--space-5) calc(var(--space-3) + env(safe-area-inset-bottom)); }
  .modal-footer .btn { flex: 1; min-height: 48px; }
}

/* ---------- Toast ---------- */
.toast-stack { position: fixed; z-index: 90; right: var(--space-6); bottom: var(--space-6); display: grid; gap: var(--space-2); }
.toast { display: flex; align-items: center; gap: var(--space-3); min-width: 280px; padding: var(--space-3) var(--space-4);
  background: var(--bv-forest-900); color: var(--bv-cream-200); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); font-size: var(--text-sm); }
.toast .icon { color: var(--bv-gold-500); }
.toast .btn { margin-left: auto; --btn-fg: var(--bv-gold-300); }
.toast .btn:hover { --btn-bg: rgba(255,255,255,.06); --btn-fg: var(--bv-gold-300); }

/* ---------- Alerts / callouts ---------- */
.callout { display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: var(--color-warning-bg); color: #6A4A0C; font-size: var(--text-sm); border: 1px solid #F1DDB2; }
.callout .icon { margin-top: 1px; }
.callout.is-info { background: var(--color-info-bg); color: var(--color-info); border-color: #D2E1EC; }

/* ---------- Empty state ---------- */
.empty { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-10) var(--space-6); text-align: center; color: var(--color-text-muted); }
.empty .empty-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--radius-lg); background: var(--bv-cream-200); color: var(--bv-gold-600); margin-bottom: var(--space-2); }
.empty h3 { font-size: var(--text-md); color: var(--color-text); }
.empty p { max-width: 320px; font-size: var(--text-sm); }

/* ---------- Skeleton loading ---------- */
.skeleton { border-radius: var(--radius-sm); background: linear-gradient(90deg, #EFEBE2 25%, #F6F3EC 37%, #EFEBE2 63%); background-size: 400% 100%; animation: bv-shimmer 1.4s ease infinite; }
@keyframes bv-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Keyboard hint ---------- */
.kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--radius-xs);
  border: 1px solid var(--color-border-strong); border-bottom-width: 2px; font: var(--weight-semi) var(--text-2xs)/1 var(--font-body); color: var(--color-text-muted); background: var(--color-surface); }

/* ---------- Charts (hand-built SVG) ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: var(--color-border-soft); stroke-width: 1; }
.chart .axis text { fill: var(--color-text-subtle); font: var(--weight-medium) 11px/1 var(--font-body); }
.chart .val { fill: var(--color-text-muted); font: var(--weight-semi) 11px/1 var(--font-body); }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: var(--text-xs); color: var(--color-text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* Horizontal bar list (channels, industries) */
.hbars { display: grid; gap: var(--space-3); }
.hbar { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: var(--space-3); font-size: var(--text-sm); }
.hbar .track { height: 8px; border-radius: var(--radius-pill); background: var(--color-surface-sunk); overflow: hidden; }
.hbar .track b { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--bv-forest-600)); }
.hbar .v { text-align: right; font-family: var(--font-display); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
