/*
   BH2MG IVA VISUAL-ONLY PROTOTYPE v4 — 2026-10-20
   CSS for the ACTUAL public IVA source, not a recreated mockup.
   No structure, display/layout, responsive breakpoints, event handlers,
   feeds, navigation, tab selection, clocks or controls are changed.
   Theme selection happens in the extension popup, outside the web page.
*/
html[data-bh2mg-preview] {
  --bh-page:#151c23;
  --bh-paper:#1a242c;
  --bh-paper-2:#202c35;
  --bh-ink:#eceae4;
  --bh-soft:#acb6be;
  --bh-line:#344149;
  --bh-brass:#d3b689;
  --bh-accent-soft:#2f302c;
  --bh-action:#d3b689;
  --bh-action-text:#151c23;
  --bh-focused:#e2c799;
  --bh-hover:#27343c;
  --bh-shadow:0 12px 32px rgba(0,0,0,.13);
  --bh-hero-ink:#f3efe5;
  --bh-hero-muted:#d3d0c7;
  --bh-hero-card:rgba(26,36,44,.78);
  --bh-hero-border:rgba(211,182,137,.38);
  --bh-hero-bg:#151c23;
  --bh-hero-image:linear-gradient(90deg,rgba(21,28,35,.78),rgba(21,28,35,.46) 44%,rgba(21,28,35,.08)),url('https://finance.bh2mg.com/finance-assets/hero-desktop-dark.jpg?v=1.5');
  --bh-hero-mobile:linear-gradient(180deg,rgba(21,28,35,.08),rgba(21,28,35,.62) 50%,#151c23),url('https://finance.bh2mg.com/finance-assets/hero-mobile-dark.jpg?v=1.5');
  color-scheme:dark;
  /* Existing IVA variables, overriding palette only. */
  --bg:var(--bh-page)!important;
  --panel:var(--bh-paper)!important;
  --panel2:var(--bh-paper-2)!important;
  --line:var(--bh-line)!important;
  --text:var(--bh-ink)!important;
  --muted:var(--bh-soft)!important;
  --gold:var(--bh-brass)!important;
  --teal:#7fc3ba!important;
  --blue:#8eacc7!important;
  --macro:#8eacc7!important;
  --policy:#bca9d2!important;
  --corp:#d3b689!important;
}
/* Light follows the OS in Auto, OR explicit Light. */
@media (prefers-color-scheme:light) {
  html[data-bh2mg-preview='auto'] { 
    --bh-page:#f6f3ed;--bh-paper:#f9f7f2;--bh-paper-2:#f0ece3;
    --bh-ink:#1d2831;--bh-soft:#66717a;--bh-line:#d9d5ca;
    --bh-brass:#9a7950;--bh-accent-soft:#e9dfce;
    --bh-action:#1d2831;--bh-action-text:#f6f3ed;
    --bh-focused:#927044;--bh-hover:#eee8dd;
    --bh-shadow:0 11px 26px rgba(39,45,48,.055);
    --bh-hero-ink:#192b35;--bh-hero-muted:#40566a;
    --bh-hero-card:rgba(250,248,243,.86);
    --bh-hero-border:rgba(154,121,80,.35);
    --bh-hero-bg:#f6f3ed;
    --bh-hero-image:linear-gradient(90deg,rgba(246,243,237,.9),rgba(246,243,237,.56) 48%,rgba(246,243,237,.08)),url('https://finance.bh2mg.com/finance-assets/hero-desktop.webp?v=1.5');
    --bh-hero-mobile:linear-gradient(180deg,rgba(246,243,237,.12),rgba(246,243,237,.8) 52%,#f6f3ed),url('https://finance.bh2mg.com/finance-assets/hero-mobile.webp?v=1.5');
    color-scheme:light;
    --blue:#426e90!important;--teal:#367e7a!important;
    --macro:#426e90!important;--policy:#80619f!important;
  }
}
html[data-bh2mg-preview='light'] {
  --bh-page:#f6f3ed;--bh-paper:#f9f7f2;--bh-paper-2:#f0ece3;
  --bh-ink:#1d2831;--bh-soft:#66717a;--bh-line:#d9d5ca;
  --bh-brass:#9a7950;--bh-accent-soft:#e9dfce;
  --bh-action:#1d2831;--bh-action-text:#f6f3ed;
  --bh-focused:#927044;--bh-hover:#eee8dd;
  --bh-shadow:0 11px 26px rgba(39,45,48,.055);
  --bh-hero-ink:#192b35;--bh-hero-muted:#40566a;
  --bh-hero-card:rgba(250,248,243,.86);
  --bh-hero-border:rgba(154,121,80,.35);
  --bh-hero-bg:#f6f3ed;
  --bh-hero-image:linear-gradient(90deg,rgba(246,243,237,.9),rgba(246,243,237,.56) 48%,rgba(246,243,237,.08)),url('https://finance.bh2mg.com/finance-assets/hero-desktop.webp?v=1.5');
  --bh-hero-mobile:linear-gradient(180deg,rgba(246,243,237,.12),rgba(246,243,237,.8) 52%,#f6f3ed),url('https://finance.bh2mg.com/finance-assets/hero-mobile.webp?v=1.5');
  color-scheme:light;
  --blue:#426e90!important;--teal:#367e7a!important;
  --macro:#426e90!important;--policy:#80619f!important;
}
/* Explicit Dark takes priority over OS preference. */
html[data-bh2mg-preview='dark'] {color-scheme:dark}

/* Colour and typography ONLY — no display, widths, positions or spacing. */
html[data-bh2mg-preview] body {
  background:var(--bh-page)!important;color:var(--bh-ink)!important;
  font-family:Inter,'Avenir Next',Avenir,'Segoe UI',Arial,sans-serif!important;
  -webkit-font-smoothing:antialiased;
}
html[data-bh2mg-preview] :is(h1,h2,h3,h4,.section-title,.today-inspector h3,.inspector h2,
  .vnext-session-name,.vnext-dir-title,.fwi-name,.fwi-mini-name,.rundown-prose h2,.rundown-prose h3) {
  font-family:Georgia,'Iowan Old Style',Baskerville,'Times New Roman',serif!important;
  font-weight:500!important;
  color:var(--bh-ink)!important;
}
html[data-bh2mg-preview] :is(.sub,.quiet,.foot,.emeta,.mmeta,.vnext-muted,.vnext-scroll-hint,
  .timeline-scroll-hint,.fwi-mini-tag,.fwi-mini-domain,.vnext-dir-note,.clockbox .sub) {color:var(--bh-soft)!important;}
html[data-bh2mg-preview] :is(.card,.vnext-utility,.vnext-watchlist,.vnext-chart-panel,
  .vnext-market-panel,.vnext-session-card,.vnext-dir-toolbar,.vnext-dir-regions,.vnext-rail-card,
  .ms22-rail-card,.v23-rail-card,.mini-chart-card,.today-inspector,.vnext-dir-source) {
  background-color:var(--bh-paper)!important;
  border-color:var(--bh-line)!important;
  color:var(--bh-ink)!important;
  box-shadow:var(--bh-shadow)!important;
}
html[data-bh2mg-preview] .card {background-image:none!important;}
html[data-bh2mg-preview] :is(.vnext-utility .clockbox,.vnext-dir-note,.vnext-market-check,
  .vnext-indicator-row,.today-catalyst,.eventcard,.mday,.day,.fwi-review,.fwi-compact-review) {
  background-color:var(--bh-paper-2)!important;
  border-color:var(--bh-line)!important;
  color:var(--bh-ink)!important;
}
html[data-bh2mg-preview] :is(.vnext-tab,.tab,.refresh,.vnext-dir-action,.vnext-region,
  .vnext-move,.ms22-tab,.ms22-nav,.ms22-day,.ms22-month-day,.ms22-region,.ms22-action,
  .iva-select-actions button,.vnext-market-picker,.vnext-search,.vnext-market-check) {
  background-color:var(--bh-paper-2)!important;
  border-color:var(--bh-line)!important;
  color:var(--bh-ink)!important;
}
html[data-bh2mg-preview] :is(.vnext-tab[aria-selected='true'],.tab.active,.day.active,
  .vnext-region[aria-pressed='true'],.ms22-tab[aria-selected='true'],.ms22-day[aria-selected='true'],
  .ms22-month-day[aria-selected='true'],.ms22-region[aria-pressed='true']) {
  background:var(--bh-accent-soft)!important;
  border-color:var(--bh-brass)!important;
  color:var(--bh-ink)!important;
}
html[data-bh2mg-preview] :is(.today-catalyst[aria-selected='true'],.today-catalyst:hover,
  .today-catalyst:focus-visible,.eventcard.selected,.eventcard:focus-visible,.mday.selected,
  .mday:focus-visible,.vnext-indicator-row[aria-selected='true']) {
  background-color:var(--bh-accent-soft)!important;
  border-color:var(--bh-brass)!important;
  color:var(--bh-ink)!important;
}
html[data-bh2mg-preview] :is(button,a,input,select,textarea):focus-visible {
  outline-color:var(--bh-focused)!important;
}
html[data-bh2mg-preview] :is(input,select,textarea) {
  color:var(--bh-ink)!important;
  background-color:var(--bh-paper)!important;
  border-color:var(--bh-line)!important;
  accent-color:var(--bh-brass);
}
html[data-bh2mg-preview] :is(.rundown-prose,.rundown-prose p,.rundown-prose li,.rundown-prose td,
  .teach,.teach p,.today-kv,.kv,.mname,.etitle,.vnext-market-check,.vnext-session-name) {
  color:var(--bh-ink)!important;
}
html[data-bh2mg-preview] :is(.rundown-prose h2,.rundown-prose h3,.rundown-prose h4) {
  color:var(--bh-ink)!important;
}
html[data-bh2mg-preview] :is(.rundown-prose a,.fwi-footer a,.rundown-prose blockquote a) {
  color:var(--bh-brass)!important;
}
html[data-bh2mg-preview] :is(.rundown-data-table th,.rundown-prose table th,
  .vnext-history th) {background-color:var(--bh-paper-2)!important;color:var(--bh-ink)!important;}
html[data-bh2mg-preview] :is(.rundown-data-table td,.rundown-data-table th,
  .rundown-prose table td,.rundown-prose table th,.vnext-history th,.vnext-history td) {
  border-color:var(--bh-line)!important;
}
html[data-bh2mg-preview] .rundown-prose blockquote {background:var(--bh-paper-2)!important;color:var(--bh-ink)!important;border-left-color:var(--bh-brass)!important;}
html[data-bh2mg-preview] :is(.pill,.badge,.vnext-chip) {
  border-color:var(--bh-line)!important;
  color:var(--bh-soft)!important;
}
html[data-bh2mg-preview] :is(.vnext-dir-note,.vnext-dir-source,.ms22-session-head small,
  .vnext-market-check small,.vnext-status,.mmeta,.emeta) {text-shadow:none!important;}
html[data-bh2mg-preview] :is(.vnext-dir-source:hover,.today-catalyst:hover,.vnext-tab:hover) {
  border-color:var(--bh-brass)!important;
}
html[data-bh2mg-preview] :is(.vnext-dir-source,.rundown-prose blockquote,.teach,.today-inspector) {
  background-color:var(--bh-paper-2)!important;
}
html[data-bh2mg-preview] :is(.v23-rail-tooltip,.iva-week-event-tooltip,.iva-catalyst-tooltip-portal) {
  background-color:var(--bh-paper)!important;
  border-color:var(--bh-line)!important;
  color:var(--bh-ink)!important;
}
html[data-bh2mg-preview] :is(.v23-rail-tooltip,.iva-week-event-tooltip) * {color:var(--bh-ink)!important;}

/* Existing cover content and positioning remain exactly as deployed. Only image colourways, overlay palette and typography change. */
html[data-bh2mg-preview] .fwi,
html[data-bh2mg-preview] .fwi-compact .fwi-shell {color:var(--bh-hero-ink)!important;}
html[data-bh2mg-preview] .fwi-full,
html[data-bh2mg-preview] .fwi-compact {
  background-color:var(--bh-hero-bg)!important;
  border-color:var(--bh-hero-border)!important;
}
html[data-bh2mg-preview] .fwi-full::before {
  background-image:var(--bh-hero-image)!important;
  filter:none!important;
}
html[data-bh2mg-preview] .fwi-compact::before {
  background-image:var(--bh-hero-image)!important;
  filter:none!important;
}
html[data-bh2mg-preview] :is(.fwi-full .fwi-name,.fwi-mini-name,.fwi-compact-review b,
  .fwi-full .fwi-domain,.fwi-full .fwi-tagline,.fwi-full .fwi-review b,.fwi-full .fwi-review small,
  .fwi-mini-tag,.fwi-mini-domain,.fwi-compact-review) {
  color:var(--bh-hero-ink)!important;
  text-shadow:none!important;
}
html[data-bh2mg-preview] .fwi-full .fwi-tagline {color:var(--bh-hero-muted)!important;}
html[data-bh2mg-preview] .fwi-full .fwi-review,
html[data-bh2mg-preview] .fwi-compact .fwi-review {
  background:var(--bh-hero-card)!important;
  border-color:var(--bh-hero-border)!important;
  box-shadow:var(--bh-shadow)!important;
}
html[data-bh2mg-preview] .fwi-full .fwi-btn,
html[data-bh2mg-preview] .fwi-compact .fwi-btn {
  color:var(--bh-hero-ink)!important;
  background:var(--bh-hero-card)!important;
  border-color:var(--bh-hero-border)!important;
}
html[data-bh2mg-preview] .fwi-full .fwi-btn.primary,
html[data-bh2mg-preview] .fwi-compact .fwi-btn.primary {
  color:var(--bh-action-text)!important;
  background:var(--bh-action)!important;
  border-color:var(--bh-action)!important;
}
html[data-bh2mg-preview] .fwi-footer {background-color:var(--bh-page)!important;color:var(--bh-soft)!important;}
@media (max-width:640px) {
  html[data-bh2mg-preview] .fwi-full::before,
  html[data-bh2mg-preview] .fwi-compact::before {
    background-image:var(--bh-hero-mobile)!important;
  }
}


/* ===========================================================================
   BH2MG IVA THEME v3 — exhaustive surface/contrast harmonisation.
   Added after v2 declarations. Only aesthetic properties; do not alter
   display, grid, geometry, overflow, positions, ordering or event semantics.
   Targets actual existing IVA v2.31 native selectors, including elements
   rendered dynamically after a tab switch or source update.
   =========================================================================== */
html[data-bh2mg-preview] {
  --bh-grid-step:calc(var(--iva-timeline-w,1920px) / 24);
  --bh-rail-bg:#142631;
  --bh-rail-grid:rgba(140,162,176,.17);
  --bh-rail-border:#3c5564;
  --bh-axis-label:#a9bdc9;
  --bh-event-bg:#283946;
  --bh-event-ink:#e7eef3;
  --bh-event-sub:#aabfc9;
  --bh-link:#a8cde0;
  --bh-warning-bg:#342c20;
  --bh-warning-line:#705839;
  --bh-warning-ink:#f0d9a6;
  --bh-control-track:#111e28;
  --bh-control-grid:#385367;
  --bh-outline:#d3b689;
  --bh-high-bg:#59323e;--bh-high-ink:#ffcad4;
  --bh-mid-bg:#53462e;--bh-mid-ink:#ffe0a4;
  --bh-low-bg:#2e4051;--bh-low-ink:#d1e4f1;
  --bh-macro-bg:#28435b;--bh-macro-ink:#d7eaf7;
  --bh-policy-bg:#423951;--bh-policy-ink:#e6d5f7;
  --bh-corp-bg:#51432e;--bh-corp-ink:#f8e0ad;
  --bh-status-bg:#334450;--bh-status-ink:#dce6ed;
  --bh-success:#88d3b6;
  --bh-error:#ffa7b4;
  --bh-muted-highlight:#a9cce0;
}
html[data-bh2mg-preview='light'] {
  --bh-rail-bg:#eff1ed;
  --bh-rail-grid:rgba(100,119,127,.16);
  --bh-rail-border:#d1d9d9;
  --bh-axis-label:#546f7f;
  --bh-event-bg:#e8eff4;
  --bh-event-ink:#203849;
  --bh-event-sub:#536c79;
  --bh-link:#235f81;
  --bh-warning-bg:#fff2d8;
  --bh-warning-line:#e1c998;
  --bh-warning-ink:#705015;
  --bh-control-track:#e4eaed;
  --bh-control-grid:#cbd5db;
  --bh-outline:#927044;
  --bh-high-bg:#f7dce3;--bh-high-ink:#802b43;
  --bh-mid-bg:#faeac6;--bh-mid-ink:#795416;
  --bh-low-bg:#e6ebf0;--bh-low-ink:#3f5469;
  --bh-macro-bg:#dfeef9;--bh-macro-ink:#265471;
  --bh-policy-bg:#ebe3f5;--bh-policy-ink:#664487;
  --bh-corp-bg:#f9eccd;--bh-corp-ink:#77551c;
  --bh-status-bg:#e3ebee;--bh-status-ink:#415969;
  --bh-success:#16634d;
  --bh-error:#a53b52;
  --bh-muted-highlight:#50748c;
}
@media (prefers-color-scheme:light) {
  html[data-bh2mg-preview='auto'] {
    --bh-rail-bg:#eff1ed;
    --bh-rail-grid:rgba(100,119,127,.16);
    --bh-rail-border:#d1d9d9;
    --bh-axis-label:#546f7f;
    --bh-event-bg:#e8eff4;
    --bh-event-ink:#203849;
    --bh-event-sub:#536c79;
    --bh-link:#235f81;
    --bh-warning-bg:#fff2d8;
    --bh-warning-line:#e1c998;
    --bh-warning-ink:#705015;
    --bh-control-track:#e4eaed;
    --bh-control-grid:#cbd5db;
    --bh-outline:#927044;
    --bh-high-bg:#f7dce3;--bh-high-ink:#802b43;
    --bh-mid-bg:#faeac6;--bh-mid-ink:#795416;
    --bh-low-bg:#e6ebf0;--bh-low-ink:#3f5469;
    --bh-macro-bg:#dfeef9;--bh-macro-ink:#265471;
    --bh-policy-bg:#ebe3f5;--bh-policy-ink:#664487;
    --bh-corp-bg:#f9eccd;--bh-corp-ink:#77551c;
    --bh-status-bg:#e3ebee;--bh-status-ink:#415969;
    --bh-success:#16634d;
    --bh-error:#a53b52;
    --bh-muted-highlight:#50748c;
  }
}

/* 1. Market Sessions: original directory checklist, rows, status and bars. */
html[data-bh2mg-preview] :is(
  #vnextSessions .ms22-check,#vnextSessions .ms22-session,
  #vnextSessions .ms22-rail-card,#vnextSessions .ms22-session-head,
  #vnextSessions .ms22-empty,#vnextSessions .ms22-canvas,
  #vnextSessions .vnext-market-check,#vnextSessions .vnext-session-card,
  #vnextSessions .vnext-market-picker,#vnextSessions .vnext-market-panel
) {
  background-color:var(--bh-paper-2)!important;
  border-color:var(--bh-line)!important;
  color:var(--bh-ink)!important;
}
html[data-bh2mg-preview] :is(
  #vnextSessions .ms22-check b,#vnextSessions .ms22-check strong,
  #vnextSessions .ms22-session b,#vnextSessions .ms22-session strong,
  #vnextSessions .ms22-session-head,#vnextSessions .ms22-session-head b,
  #vnextSessions .ms22-session-head strong,#vnextSessions .vnext-market-check b,
  #vnextSessions .vnext-session-name,#vnextSessions .vnext-dir-title,
  #vnextSessions .vnext-market-panel strong
) {color:var(--bh-ink)!important;text-shadow:none!important;}
html[data-bh2mg-preview] :is(
  #vnextSessions .ms22-check small,#vnextSessions .ms22-session-head small,
  #vnextSessions .ms22-count,#vnextSessions .ms22-empty,
  #vnextSessions .vnext-market-check small,#vnextSessions .vnext-dir-state,
  #vnextSessions .ms22-hours,#vnextSessions .ms22-month-day small
) {color:var(--bh-soft)!important;}
html[data-bh2mg-preview] :is(#vnextSessions .ms22-track,
  #vnextSessions .vnext-market-check input[type='checkbox']) {
  background-color:var(--bh-control-track)!important;
  border-color:var(--bh-rail-border)!important;
}
html[data-bh2mg-preview] :is(#vnextSessions .ms22-check:hover,
  #vnextSessions .ms22-session:hover) {border-color:var(--bh-brass)!important;}
html[data-bh2mg-preview] :is(#vnextSessions .ms22-note,#vnextSessions .vnext-dir-note) {
  background:var(--bh-warning-bg)!important;
  border-color:var(--bh-warning-line)!important;
  color:var(--bh-warning-ink)!important;
}
html[data-bh2mg-preview] :is(#vnextSessions .ms22-state,#vnextSessions .vnext-dir-state) {
  color:var(--bh-soft)!important;
}
html[data-bh2mg-preview] :is(#vnextSessions .ms22-state.closed,#vnextSessions .vnext-dir-state.closed) {color:var(--bh-error)!important;}
html[data-bh2mg-preview] :is(#vnextSessions .ms22-state.special,#vnextSessions .vnext-dir-state.special) {color:var(--bh-warning-ink)!important;}
html[data-bh2mg-preview] :is(#vnextSessions .ms22-region,#vnextSessions .vnext-region,
  #vnextSessions .ms22-action,#vnextSessions .ms22-nav,#vnextSessions .ms22-day,
  #vnextSessions .ms22-month-day,#vnextSessions .vnext-dir-action,
  #vnextSessions .iva-select-actions button,#vnextSessions .vnext-move) {
  background-color:var(--bh-paper-2)!important;
  border-color:var(--bh-line)!important;
  color:var(--bh-ink)!important;
}
html[data-bh2mg-preview] :is(
  #vnextSessions .ms22-region[aria-pressed='true'],#vnextSessions .ms22-day[aria-selected='true'],
  #vnextSessions .ms22-month-day[aria-selected='true'],#vnextSessions .ms22-tab[aria-selected='true'],
  #vnextSessions .vnext-region[aria-pressed='true']
) {background-color:var(--bh-accent-soft)!important;color:var(--bh-ink)!important;border-color:var(--bh-brass)!important;}

/* 2. Market & catalyst 24-hour rails — light paper grid, dark midnight grid.
      Keep marker colours, hit areas, events, scrollbars and pointer behaviour. */
html[data-bh2mg-preview] :is(
  #vnextToday .v23-rail-track,#vnextToday .ms22-canvas,
  #vnextCatalysts .v23-rail-track,#vnextCatalysts .ms22-canvas,
  #vnextSessions .v23-rail-track,#vnextSessions .ms22-canvas
) {
  background-color:var(--bh-rail-bg)!important;
  background-image:repeating-linear-gradient(to right,var(--bh-rail-bg) 0,
     var(--bh-rail-bg) calc(var(--bh-grid-step) - 1px),var(--bh-rail-grid) var(--bh-grid-step))!important;
  border-color:var(--bh-rail-border)!important;
}
html[data-bh2mg-preview] :is(
  #vnextToday .v23-rail-hours,#vnextToday .ms22-hours,
  #vnextCatalysts .v23-rail-hours,#vnextCatalysts .ms22-hours,
  #vnextSessions .v23-rail-hours,#vnextSessions .ms22-hours,
  .timeline-scroll .axis,.timeline-scroll .tick,.axis .tick
) {color:var(--bh-axis-label)!important;}
html[data-bh2mg-preview] :is(.timeline-scroll .rail,.timeline-scroll .axis,.rail,
  .timeline-scroll #timelineScroll .rail) {
  background-color:var(--bh-rail-bg)!important;
  background-image:repeating-linear-gradient(to right,transparent 0,
    transparent calc(var(--bh-grid-step) - 1px),var(--bh-rail-grid) var(--bh-grid-step))!important;
  border-color:var(--bh-rail-border)!important;
}
html[data-bh2mg-preview] :is(
  #vnextToday .ms22-mark time,#vnextCatalysts .ms22-mark time,
  #vnextSessions .ms22-mark time,#vnextSessions .ms22-now span,
  #vnextToday .v23-rail-caption,#vnextCatalysts .v23-rail-caption,
  .timeline-scroll-hint,.vnext-scroll-hint,.v23-rail-caption
) {color:var(--bh-axis-label)!important;}
html[data-bh2mg-preview] :is(
  #vnextToday .ms22-tip,#vnextCatalysts .ms22-tip,#vnextSessions .ms22-tip,
  .v23-rail-tooltip,.iva-week-event-tooltip,.iva-catalyst-tooltip-portal
) {background:var(--bh-paper)!important;border-color:var(--bh-rail-border)!important;color:var(--bh-ink)!important;}
html[data-bh2mg-preview] :is(.v23-rail-tooltip,.ms22-tip,.iva-week-event-tooltip,
  .iva-catalyst-tooltip-portal) :is(b,strong,small,span,time) {color:inherit!important;}
html[data-bh2mg-preview] :is(.ms22-rail,.v23-rail-scroll,.ms22-scroll) {
  scrollbar-color:var(--bh-brass) var(--bh-paper-2)!important;
}
html[data-bh2mg-preview] #vnextSessions .ms22-scroll::-webkit-scrollbar-track {background:var(--bh-paper-2)!important;}
html[data-bh2mg-preview] #vnextSessions .ms22-scroll::-webkit-scrollbar-thumb {background:var(--bh-brass)!important;border-color:var(--bh-paper-2)!important;}
html[data-bh2mg-preview] :is(.v23-rail-range,.ms22-range,.timeline-range,#vnextSessions input[type='range']) {
  accent-color:var(--bh-brass)!important;
}

/* 3. Month calendar: event chips, dates and category labels remain visible.
      Never alter date ordering, buttons, selected/disabled state or days. */
html[data-bh2mg-preview] :is(
  #vnextCatalysts .mday,#vnextCatalysts .mday.blank,#vnextCatalysts .day,
  #vnextCatalysts .monthgrid,#vnextCatalysts .monthdetail,
  #vnextCatalysts .vnext-week-lower>.card
) {background-color:var(--bh-paper-2)!important;border-color:var(--bh-line)!important;color:var(--bh-ink)!important;}
html[data-bh2mg-preview] :is(#vnextCatalysts .mday.today,#vnextCatalysts .mday.selected,
  #vnextCatalysts .mday:hover,#vnextCatalysts .day.active) {
  background-color:var(--bh-accent-soft)!important;border-color:var(--bh-brass)!important;color:var(--bh-ink)!important;
}
html[data-bh2mg-preview] :is(.mday .mnum,.day strong,.mday b,
  #vnextCatalysts .mday strong) {color:var(--bh-ink)!important;}
html[data-bh2mg-preview] :is(.mday .mcount,.mday small,
  .mday .weekday,#vnextCatalysts .weekday) {color:var(--bh-soft)!important;}
html[data-bh2mg-preview] :is(.mday .marker,.marker) {
  background-color:var(--bh-event-bg)!important;
  color:var(--bh-event-ink)!important;
  border-color:var(--bh-rail-border)!important;
  text-shadow:none!important;
}
html[data-bh2mg-preview] .mday .marker :is(b,strong,small,span){color:var(--bh-event-ink)!important;}
html[data-bh2mg-preview] :is(.today-catalyst b,.eventcard .etitle,.sheet .etitle,
  .inspector h2,.today-inspector h3,.mday .mnum) {color:var(--bh-ink)!important;}
html[data-bh2mg-preview] :is(.eventcard,.today-catalyst,.sheet,.monthdetail .card) {
  color:var(--bh-ink)!important;border-color:var(--bh-line)!important;
}
html[data-bh2mg-preview] :is(.today-kv b,.kv b,.emeta,.etitle~small,
  #vnextCatalysts .mday .mcount) {color:var(--bh-soft)!important;}

/* 4. Native category/severity badges — do not erase semantic distinctions. */
html[data-bh2mg-preview] .badge {border-color:transparent!important;color:var(--bh-status-ink)!important;background-color:var(--bh-status-bg)!important;}
html[data-bh2mg-preview] :is(.badge.high,.badge.High) {background:var(--bh-high-bg)!important;color:var(--bh-high-ink)!important;}
html[data-bh2mg-preview] :is(.badge.medium,.badge.Medium) {background:var(--bh-mid-bg)!important;color:var(--bh-mid-ink)!important;}
html[data-bh2mg-preview] :is(.badge.low,.badge.Low) {background:var(--bh-low-bg)!important;color:var(--bh-low-ink)!important;}
html[data-bh2mg-preview] :is(.badge.Macro,.badge.macro) {background:var(--bh-macro-bg)!important;color:var(--bh-macro-ink)!important;}
html[data-bh2mg-preview] :is(.badge.Policy,.badge.policy) {background:var(--bh-policy-bg)!important;color:var(--bh-policy-ink)!important;}
html[data-bh2mg-preview] :is(.badge.Earnings,.badge.Corporate,.badge.corporate) {background:var(--bh-corp-bg)!important;color:var(--bh-corp-ink)!important;}
html[data-bh2mg-preview] :is(.badge.status,.badge.Status) {background:var(--bh-status-bg)!important;color:var(--bh-status-ink)!important;}
html[data-bh2mg-preview] .pill {background:var(--bh-paper-2)!important;border-color:var(--bh-line)!important;color:var(--bh-soft)!important;}
html[data-bh2mg-preview] .pill.ok {color:var(--bh-success)!important;border-color:var(--bh-success)!important;}

/* 5. Tables, reader prose, chart labels, links and notes. */
html[data-bh2mg-preview] :is(.rundown-prose a,.vnext-dir-source,
  #vnextSessions a,.market-review-layout a) {color:var(--bh-link)!important;}
html[data-bh2mg-preview] :is(.rundown-prose h2,.rundown-prose h3,
  .rundown-prose h4,.today-inspector h3,.vnext-session-name) {color:var(--bh-ink)!important;}
html[data-bh2mg-preview] :is(.rundown-prose table,.rundown-data-table,.vnext-history) {
  background-color:var(--bh-paper)!important;color:var(--bh-ink)!important;
}
html[data-bh2mg-preview] :is(.rundown-prose td,.rundown-prose th,
  .rundown-data-table td,.rundown-data-table th) {background-color:var(--bh-paper)!important;color:var(--bh-ink)!important;border-color:var(--bh-line)!important;}
html[data-bh2mg-preview] :is(.rundown-prose th,.rundown-data-table th) {background-color:var(--bh-paper-2)!important;}
html[data-bh2mg-preview] :is(.ms22-note,.vnext-dir-note,
  #vnextSessions .ms22-note) {background:var(--bh-warning-bg)!important;border-color:var(--bh-warning-line)!important;color:var(--bh-warning-ink)!important;}

/* 6. Selected, hovered, focus: pure colour feedback with original geometry. */
html[data-bh2mg-preview] :is(button,a,input,select,textarea,[tabindex]):focus-visible {
  outline-color:var(--bh-outline)!important;
}
html[data-bh2mg-preview] :is(.ms22-check,.ms22-session,.vnext-market-check,
  .today-catalyst,.eventcard,.mday,.vnext-dir-action,.ms22-tab):focus-visible {
  border-color:var(--bh-brass)!important;
}


/* v4: LIGHT MODE REGULAR TYPOGRAPHY ONLY.
   All original headings, buttons, source paragraphs, cards, labels and dynamically
   generated elements retain their semantic tags and sizes. Only weight is changed.
   The never-used ID branch in :is() raises specificity above old !important
   font-weight declarations without altering the set of matched elements.
   Explicit Dark and Auto→Dark keep their original typographic emphasis. */
html[data-bh2mg-preview='light'] body,
html[data-bh2mg-preview='light'] body :is(*,#bh2mg-preview-weight-override),
html[data-bh2mg-preview='light'] body :is(*,#bh2mg-preview-weight-override)::before,
html[data-bh2mg-preview='light'] body :is(*,#bh2mg-preview-weight-override)::after {
  font-weight:400!important;
  font-synthesis-weight:none!important;
}
@media (prefers-color-scheme:light) {
  html[data-bh2mg-preview='auto'] body,
  html[data-bh2mg-preview='auto'] body :is(*,#bh2mg-preview-weight-override),
  html[data-bh2mg-preview='auto'] body :is(*,#bh2mg-preview-weight-override)::before,
  html[data-bh2mg-preview='auto'] body :is(*,#bh2mg-preview-weight-override)::after {
    font-weight:400!important;
    font-synthesis-weight:none!important;
  }
}

/* v4: LIGHT SESSION REORDER BUTTONS. The original app's reorder functions,
   disabled attributes, tab order, hit targets and arrow glyphs are untouched.
   Override the real native IVA classes .iva-move and .vnext-move. */
html[data-bh2mg-preview='light'][data-bh2mg-preview] #vnextSessions :is(.iva-move,.vnext-move) {
  background:#f8f6f0!important;
  color:#293744!important;
  border-color:#bdb6a8!important;
  box-shadow:none!important;
  text-shadow:none!important;
}
html[data-bh2mg-preview='light'][data-bh2mg-preview] #vnextSessions :is(.iva-move,.vnext-move):hover:not(:disabled) {
  background:#e8dfd1!important;
  color:#25333e!important;
  border-color:#987d59!important;
}
html[data-bh2mg-preview='light'][data-bh2mg-preview] #vnextSessions :is(.iva-move,.vnext-move):disabled {
  background:#eeeae3!important;
  color:#8b908f!important;
  border-color:#d4d0c7!important;
  opacity:1!important;
}
html[data-bh2mg-preview='light'][data-bh2mg-preview] #vnextSessions :is(.iva-move,.vnext-move):focus-visible {
  outline-color:var(--bh-focused)!important;
}
@media (prefers-color-scheme:light) {
  html[data-bh2mg-preview='auto'][data-bh2mg-preview] #vnextSessions :is(.iva-move,.vnext-move) {
    background:#f8f6f0!important;
    color:#293744!important;
    border-color:#bdb6a8!important;
    box-shadow:none!important;
    text-shadow:none!important;
  }
  html[data-bh2mg-preview='auto'][data-bh2mg-preview] #vnextSessions :is(.iva-move,.vnext-move):hover:not(:disabled) {
    background:#e8dfd1!important;
    color:#25333e!important;
    border-color:#987d59!important;
  }
  html[data-bh2mg-preview='auto'][data-bh2mg-preview] #vnextSessions :is(.iva-move,.vnext-move):disabled {
    background:#eeeae3!important;
    color:#8b908f!important;
    border-color:#d4d0c7!important;
    opacity:1!important;
  }
  html[data-bh2mg-preview='auto'][data-bh2mg-preview] #vnextSessions :is(.iva-move,.vnext-move):focus-visible {
    outline-color:var(--bh-focused)!important;
  }
}
