/* ==========================================================================
   Ledger HQ -- fullthrottle.ai design system
   Palette, typography and surface tokens are taken from ft-design-system.
   Tokens are declared twice: dark on :root, light under
   :root[data-theme="light"]. app/layout.js sets data-theme="light", which is
   the palette this tool is designed around; the dark block keeps the app from
   breaking if the attribute is ever dropped or flipped.
   Rule: no raw hex/rgb in component CSS -- always var(--token), or the UI
   stops adapting when the theme flips.
   ========================================================================== */
:root {
  color-scheme: light dark;

  --bg-0:#060a12; --bg-1:#0b111a; --bg-2:#131c2a;
  --panel:rgba(13,19,28,0.72); --panel-inner:rgba(6,10,18,0.6);
  --panel-border:rgba(0,154,168,0.28); --panel-border-strong:rgba(0,184,199,0.6);
  --hairline:rgba(255,255,255,0.06); --hairline-strong:rgba(255,255,255,0.12);
  --text:#f1f6fc; --text-dim:#a8b8cc; --text-faint:#6f8094;
  --teal:#009aa8; --teal-bright:#00b8c7;
  --teal-glow:rgba(0,154,168,0.5); --teal-glow-soft:rgba(0,154,168,0.18);
  --green:#4ade80; --amber:#fbbf24; --red:#f87171; --slate:#94a3b8;

  --radius-lg:18px; --radius-md:12px; --radius-sm:8px;
  --max-w:1560px; /* 10-column ledger on Direct/Agency/Enterprise (CSM, Sales,
    NetSuite / Stripe, Platform fee, Media + SmartMail, Total
    revenue, Fee changes, plus channel/advertiser/drilldown) needs more room
    than the original 8-column table did. First widened to 1400px (2026-09),
    which fit the 9-column iHeart/Nexstar tabs but not Direct/Agency/
    Enterprise's extra Sales column -- widened again to fit all five tabs
    without spilling past the panel. */
  --ease-out:cubic-bezier(0.32,0.72,0.24,1);

  /* App-local aliases. Existing markup and mockup-app.js reference --accent
     and --grey; they resolve through the brand tokens so there is still one
     source of truth. --surface is the opaque card/input fill (white on light,
     a raised panel on dark) that replaces the hardcoded #fff this file used. */
  --accent:var(--teal);
  --grey:var(--slate);
  --surface:#0d131c;
  --surface-translucent:rgba(255,255,255,0.05);
  --surface-hover:rgba(255,255,255,0.09);
  --row-hover:rgba(0,154,168,0.10);
  --scrim:rgba(3,7,12,0.62);
  --shadow-panel:0 6px 20px rgba(0,0,0,0.35);
  --shadow-modal:0 24px 60px rgba(0,0,0,0.55);
  --chart-grid:rgba(255,255,255,0.08);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg-0:#ffffff; --bg-1:#f4f7fa; --bg-2:#e9eff5;
  --panel:rgba(255,255,255,0.82); --panel-inner:rgba(244,247,250,0.72);
  --panel-border:rgba(0,154,168,0.30); --panel-border-strong:rgba(0,154,168,0.55);
  --hairline:rgba(11,31,36,0.10); --hairline-strong:rgba(11,31,36,0.16);
  --text:#0b1f24; --text-dim:#3f5560; --text-faint:#6b7f89;
  --teal:#009aa8; --teal-bright:#00818f;
  --teal-glow:rgba(0,154,168,0.35); --teal-glow-soft:rgba(0,154,168,0.12);
  --green:#0b8043; --amber:#b45309; --red:#dc2626; --slate:#64748b;

  --surface:#ffffff;
  --surface-translucent:rgba(255,255,255,0.5);
  --surface-hover:rgba(255,255,255,0.7);
  --row-hover:rgba(0,154,168,0.05);
  --scrim:rgba(11,31,36,0.40);
  --shadow-panel:0 6px 20px rgba(11,31,36,0.05);
  --shadow-modal:0 24px 60px rgba(11,31,36,0.2);
  --chart-grid:rgba(11,31,36,0.06);
}

*{box-sizing:border-box;}
html,body{
  margin:0;padding:0;min-height:100%;
  color:var(--text);
  font-family:"helvetica-neue-lt-pro",-apple-system,BlinkMacSystemFont,'Helvetica Neue',Arial,sans-serif;
}
/* ft-design-system page ground: faint teal wash top and bottom over the
   neutral gradient, pinned so it does not scroll with long tables. */
body{
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, var(--teal-glow-soft), transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 110%, var(--teal-glow-soft), transparent 60%),
    linear-gradient(180deg,var(--bg-0) 0%,var(--bg-1) 60%,var(--bg-2) 100%);
  background-attachment:fixed;
}

::selection{background:var(--teal-glow);color:#fff;}
::-moz-selection{background:var(--teal-glow);color:#fff;}
::-webkit-scrollbar{width:10px;height:10px;}
::-webkit-scrollbar-track{background:transparent;}
::-webkit-scrollbar-thumb{background:var(--teal-glow-soft);border-radius:6px;border:2px solid transparent;background-clip:padding-box;}
::-webkit-scrollbar-thumb:hover{background:var(--teal-glow);border:2px solid transparent;background-clip:padding-box;}

.wrap{max-width:var(--max-w);margin:0 auto;padding:24px 20px 56px;}
.bhq-topbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;padding-bottom:16px;}

/* Header lockup: canonical fullthrottle.ai wordmark, always visible, with the
   product name set off by a hairline rule. The mark is inlined (see
   lib/ftLogo.js) so the glyph keeps its teal and the wordmark tracks --text. */
.bhq-logo-wrap{display:flex;align-items:center;gap:12px;min-height:34px;}
.bhq-logo-slot{flex:0 0 auto;display:block;width:146px;}
.ft-logo{width:100%;height:auto;display:block;color:var(--text);}
.bhq-logo-rule{flex:0 0 auto;width:1px;height:20px;background:var(--hairline-strong);}
.bhq-h1{margin:0;font-size:15px;font-weight:700;color:var(--text);letter-spacing:-0.01em;}
@media (max-width:420px){ .bhq-logo-slot{width:120px;} }

.bhq-ops-btn{background:var(--panel-inner);color:var(--text-dim);border:1px solid var(--hairline-strong);border-radius:999px;padding:7px 14px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;cursor:pointer;font-family:inherit;transition:border-color 160ms var(--ease-out),color 160ms var(--ease-out);}
.bhq-ops-btn:hover{border-color:var(--panel-border-strong);color:var(--teal-bright);}

.bhq-tabs-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:8px;}
.bhq-tabs-row .bhq-tabs{margin-bottom:0;}
.bhq-tabs{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:8px;}
/* Core Business Only: a switch beside the channel tabs and in Variance's pickers. */
.bhq-core-only{padding-top:8px;}
/* Beside the channel tabs: the budget toggle and the switch sit on one line,
   centred on the tab row's height (a tab is about 36px). */
.bhq-tabs-row .bhq-core-only{display:flex;align-items:center;gap:16px;min-height:36px;padding-top:0;}
.bhq-switch{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;font-weight:700;color:var(--text-dim);white-space:nowrap;cursor:pointer;position:relative;}
.bhq-switch input{position:absolute;opacity:0;width:1px;height:1px;margin:0;}
.bhq-switch-track{width:32px;height:18px;border-radius:999px;background:var(--hairline-strong);position:relative;flex:none;transition:background 160ms var(--ease-out);}
.bhq-switch-track::after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform 160ms var(--ease-out);}
.bhq-switch input:checked + .bhq-switch-track{background:var(--teal);}
.bhq-switch input:checked + .bhq-switch-track::after{transform:translateX(14px);}
.bhq-switch input:focus-visible + .bhq-switch-track{outline:2px solid var(--teal);outline-offset:2px;}
.bhq-switch:has(input:checked){color:var(--text);}
.bhq-tab{
  background:var(--surface-translucent);backdrop-filter:blur(10px) saturate(140%);-webkit-backdrop-filter:blur(10px) saturate(140%);
  border:1px solid var(--hairline-strong);border-radius:999px;padding:9px 18px;font-size:12.5px;font-weight:700;
  color:var(--text-dim);cursor:pointer;font-family:inherit;transition:all 160ms var(--ease-out);box-shadow:0 1px 2px var(--hairline);
}
.bhq-tab:hover{border-color:var(--tab-accent);color:var(--text);background:var(--surface-hover);}
.bhq-tab.is-active{
  background:linear-gradient(135deg, color-mix(in srgb, var(--tab-accent) 22%, var(--surface)) 0%, color-mix(in srgb, var(--tab-accent) 10%, var(--surface)) 100%);
  border-color:var(--tab-accent);color:var(--tab-accent);box-shadow:0 4px 14px color-mix(in srgb, var(--tab-accent) 30%, transparent), inset 0 1px 0 var(--hairline-strong);
}
.bhq-cycle{font-size:11.5px;color:var(--text-faint);margin:6px 0 14px;}

.bhq-panel{background:var(--panel);border:1px solid var(--hairline-strong);border-radius:var(--radius-md);padding:18px 20px;display:flex;flex-direction:column;gap:14px;margin-top:16px;box-shadow:var(--shadow-panel);}
.bhq-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.bhq-panel-title{margin:0;font-size:14px;font-weight:700;}
.bhq-panel-meta{font-size:11.5px;color:var(--text-faint);}

.bhq-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
@media (max-width:640px){ .bhq-stat-grid{grid-template-columns:1fr;} }
.bhq-stat-card{background:var(--panel-inner);border:1px solid var(--hairline);border-top:3px solid var(--accent);border-radius:var(--radius-md);padding:16px 18px;display:flex;flex-direction:column;gap:10px;}
.bhq-stat-label{font-size:10.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text-faint);}
.bhq-stat-value{font-size:26px;font-weight:700;letter-spacing:-0.02em;font-variant-numeric:tabular-nums;}
.bhq-stat-trend{display:flex;gap:14px;font-size:11.5px;color:var(--text-faint);font-variant-numeric:tabular-nums;}
.bhq-stat-trend b{color:var(--text-dim);font-weight:700;}
.bhq-stat-sub{display:flex;flex-direction:column;gap:4px;margin-top:2px;padding-top:10px;border-top:1px solid var(--hairline);}
.bhq-stat-sub-row{display:flex;justify-content:space-between;font-size:12px;color:var(--text-dim);font-variant-numeric:tabular-nums;}
.bhq-stat-triplet{display:flex;gap:18px;}
.bhq-stat-mini{display:flex;flex-direction:column;gap:1px;}
.bhq-stat-mini-label{font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--text-faint);}
.bhq-stat-mini-value{font-size:16px;font-weight:700;font-variant-numeric:tabular-nums;}
.bhq-chart-wrap{height:190px;margin-top:2px;position:relative;}

.bhq-field{display:flex;flex-direction:column;gap:5px;}
.bhq-field label{font-size:9.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--text-faint);}
.bhq-field select, .bhq-field input{font-size:13px;padding:8px 12px;border:1px solid var(--hairline-strong);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);min-width:170px;font-family:inherit;}
.bhq-field select:focus-visible, .bhq-field input:focus-visible,
.bhq-modal input:focus-visible, .bhq-modal textarea:focus-visible, .bhq-modal select:focus-visible{outline:2px solid var(--teal);outline-offset:1px;border-color:var(--teal);}
.bhq-field.grow{flex:1;}
.bhq-field.grow input{min-width:220px;width:100%;}
table{width:100%;border-collapse:collapse;font-size:13px;}
thead th{text-align:left;font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text-faint);padding:9px 14px;border-bottom:1px solid var(--hairline);white-space:nowrap;}
tbody td{padding:11px 14px;border-bottom:1px solid var(--hairline);vertical-align:middle;font-variant-numeric:tabular-nums;}
tbody tr:last-child td{border-bottom:none;}
tbody tr.bhq-adv-row:hover td, tbody tr.bhq-req-row:hover td{background:var(--row-hover);}
td.wrap{white-space:normal;max-width:220px;font-variant-numeric:normal;}
/* Three money columns sit side by side, so they are ranked by size and
   weight rather than colour: total revenue is the anchor (large), the
   platform fee next, media supporting detail (dim). Green was dropped
   (2026-09-30): it read as good news on every row, $0.00 included. A zero
   figure fades so the rows that bill stand out. */
td.fee{font-weight:700;color:var(--text);text-align:right;font-size:15px;white-space:nowrap;}
td.fee--media{font-weight:700;color:var(--text-dim);}
td.fee--revenue{color:var(--text);font-size:17px;}
td.fee.is-zero{color:var(--text-faint);font-weight:400;}

/* The edit control sits with the figure it edits rather than in a far-right
   actions column. Every fee cell reserves the same icon slot whether or not
   the icon is interactive, so the numbers still line up down the column. */
.fee-cell{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;}
.fee-val{font-variant-numeric:tabular-nums;}
.bhq-edit{
  flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
  width:24px;height:24px;padding:0;border-radius:var(--radius-sm);
  background:transparent;border:1px solid transparent;color:var(--text-faint);
  cursor:pointer;font-family:inherit;
  transition:color 140ms var(--ease-out),background 140ms var(--ease-out),border-color 140ms var(--ease-out);
}
.bhq-edit:hover{color:var(--teal-bright);border-color:var(--panel-border);background:var(--teal-glow-soft);}
.bhq-edit:focus-visible{outline:2px solid var(--teal);outline-offset:1px;}
.bhq-edit.is-locked{color:var(--text-faint);cursor:not-allowed;}
.bhq-edit.is-locked svg{opacity:.45;}
.bhq-edit.is-locked:hover{color:var(--text-faint);background:transparent;border-color:transparent;}
/* Pencils appear on the row being worked (hover or keyboard focus), not on
   all 800 rows at once. opacity, not display, so the icon slot stays
   reserved and the figures keep their alignment. Touch screens have no
   hover, so they keep the icons. */
@media (hover:hover){
  .bhq-adv-row .bhq-edit{opacity:0;transition:opacity 120ms var(--ease-out),color 140ms var(--ease-out),background 140ms var(--ease-out),border-color 140ms var(--ease-out);}
  .bhq-adv-row:hover .bhq-edit, .bhq-adv-row:focus-within .bhq-edit{opacity:1;}
}

/* Tooltip lives on <body>, not on the control. A CSS ::after inside a table
   cell cannot be lifted above neighbouring rows or the sticky header -- table
   rows paint as their own layers -- and it would be clipped by the horizontal
   scroll container on narrow screens. Positioned by script from data-tip; the
   same text is on aria-label, so nothing is announced twice. */
.bhq-tip{
  position:fixed;z-index:400;pointer-events:none;
  padding:6px 9px;border-radius:var(--radius-sm);
  background:var(--text);color:var(--bg-0);
  font-size:11.5px;font-weight:700;line-height:1.35;
  max-width:200px;text-align:left;
  opacity:0;transition:opacity 120ms var(--ease-out);
}
.bhq-tip.is-on{opacity:1;}
@media (prefers-reduced-motion: reduce){ .bhq-tip{transition:none;} }
.bhq-fee-current{color:var(--text-faint);font-weight:400;}
.bhq-fee-new{color:var(--text);font-weight:700;}
td.change{font-weight:700;}
.bhq-link{background:none;border:none;padding:0;color:var(--text);font-weight:700;font-family:inherit;font-size:13px;cursor:pointer;text-align:left;}
.bhq-link:hover{color:var(--accent);text-decoration:underline;}
.bhq-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;background:linear-gradient(135deg, var(--accent) 0%, var(--teal-bright) 100%);border:none;border-radius:999px;color:#fff;font-size:11.5px;font-weight:700;letter-spacing:.02em;font-family:inherit;cursor:pointer;white-space:nowrap;transition:filter 160ms var(--ease-out),box-shadow 160ms var(--ease-out);}
.bhq-btn:hover{filter:brightness(1.06);box-shadow:0 4px 14px var(--teal-glow-soft);}
.bhq-btn--sm{padding:6px 12px;font-size:11px;}
.bhq-btn--outline{background:var(--surface);color:var(--accent);border:1px solid var(--accent);}
.bhq-btn--teal{background:linear-gradient(135deg,var(--teal) 0%,var(--teal-bright) 100%);}
.bhq-btn--remove{background:var(--surface);color:var(--red);border:1px solid var(--red);}
.bhq-btn--remove:hover{box-shadow:0 4px 14px color-mix(in srgb,var(--red) 25%,transparent);}
.bhq-btn:disabled{opacity:.4;cursor:not-allowed;}
.bhq-ghost{background:transparent;border:1px solid var(--hairline-strong);color:var(--text-dim);border-radius:999px;padding:6px 12px;font-size:11px;font-weight:700;cursor:pointer;font-family:inherit;}
.bhq-ghost:hover{border-color:var(--panel-border-strong);color:var(--text);}
.bhq-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center;}
.bhq-pill{display:inline-block;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;padding:3px 10px;border-radius:999px;white-space:nowrap;}
.bhq-pill--pending{color:var(--amber);background:color-mix(in srgb, var(--amber) 14%, transparent);}
.bhq-pill--complete{color:var(--green);background:color-mix(in srgb, var(--green) 14%, transparent);}
.bhq-pill--cancelled{color:var(--text-faint);background:color-mix(in srgb, var(--slate) 16%, transparent);}
.bhq-pill--managed{color:var(--teal-bright);background:var(--teal-glow-soft);}
.bhq-pill--selfserve{color:var(--text-dim);background:color-mix(in srgb, var(--text-dim) 10%, transparent);}
.bhq-pill--route{color:var(--text-dim);background:color-mix(in srgb, var(--text-dim) 10%, transparent);}
.bhq-pill--route-missing{color:var(--amber);background:color-mix(in srgb, var(--amber) 12%, transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--amber) 45%, transparent);}
.bhq-empty{color:var(--text-faint);font-size:12.5px;padding:14px 4px;}
/* Fixed, not absolute: anchored to #stage the backdrop centred the dialog
   against the full scrolled height of the advertiser table, which puts it
   hundreds of pixels below the fold. Fixed centres it in the viewport. */
.bhq-modal-backdrop{position:fixed;inset:0;background:var(--scrim);display:flex;align-items:center;justify-content:center;z-index:50;padding:20px;overflow:auto;}
.bhq-modal{width:100%;max-width:460px;background:var(--surface);border:1px solid var(--hairline-strong);border-radius:var(--radius-lg);padding:22px;display:flex;flex-direction:column;gap:12px;box-shadow:var(--shadow-modal);max-height:80vh;overflow:auto;}
/* Wide variant for the mapping queue: a row per unmapped value with its own
   label and select needs more horizontal room than the standard modal's
   460px before the select wraps awkwardly under the label. */
.bhq-modal--wide{max-width:640px;}
/* Two columns: the name gets the larger share and wraps between words (a
   single word longer than the column is the only thing broken), the
   select takes the rest. A squeezed flex label used to wrap mid-word. */
.bhq-mapping-row{display:grid;grid-template-columns:minmax(140px,3fr) minmax(170px,2fr);align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid var(--hairline);}
.bhq-mapping-row:last-child{border-bottom:none;}
.bhq-mapping-label{font-size:13px;color:var(--text);overflow-wrap:break-word;word-break:normal;min-width:0;}
.bhq-mapping-row > select,.bhq-mapping-row > span{min-width:0;width:100%;}
.bhq-mapping-row select,.bhq-mapping-row .bhq-mapping-other{width:100%;box-sizing:border-box;}
@media (max-width:480px){ .bhq-mapping-row{grid-template-columns:1fr;gap:6px;} }
.bhq-mapping-group-title{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-faint);margin:10px 0 2px;}
.bhq-modal h3{margin:0;font-size:15px;}
.bhq-modal p{margin:0;font-size:12px;color:var(--text-faint);}
.bhq-modal input, .bhq-modal textarea, .bhq-modal select{font-size:13px;padding:8px 10px;border:1px solid var(--hairline-strong);border-radius:var(--radius-sm);width:100%;font-family:inherit;background:var(--surface);color:var(--text);}
.stage{position:relative;}
.bhq-modal-status{min-height:16px;font-size:12px;color:var(--green);}

.bhq-count-btn{width:26px;height:26px;border-radius:999px;border:1px solid var(--hairline-strong);background:var(--surface);color:var(--text-faint);font-size:12px;font-weight:700;font-family:inherit;cursor:pointer;}
.bhq-count-btn.has-open{background:var(--accent);border-color:var(--accent);color:#fff;}
.bhq-count-btn.is-zero{border-color:transparent;background:transparent;font-weight:400;}
.bhq-count-btn.is-zero:hover{border-color:var(--hairline-strong);}
.bhq-i-btn{width:22px;height:22px;border-radius:999px;border:1px solid var(--hairline-strong);background:var(--surface);color:var(--text-faint);font-size:11px;font-weight:700;font-family:inherit;font-style:italic;cursor:pointer;line-height:1;}
.bhq-i-btn:hover{border-color:var(--teal);color:var(--teal-bright);}

.bhq-expand-row td{padding:0;border-bottom:1px solid var(--hairline);background:var(--panel-inner);}
.bhq-expand-inner{padding:14px 18px 16px;display:flex;flex-direction:column;gap:14px;}
.bhq-expand-section-title{font-size:10.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text-faint);margin:0 0 6px;}
.bhq-req-line{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px solid var(--hairline);font-size:12.5px;}
.bhq-req-line:last-child{border-bottom:none;}
.bhq-req-meta{color:var(--text-faint);font-size:11px;}
.bhq-detail-inner{padding:10px 18px;font-size:12.5px;color:var(--text-dim);display:flex;flex-direction:column;gap:3px;}
.bhq-detail-inner b{color:var(--text);}

.bhq-dot-row{display:flex;align-items:baseline;gap:6px;font-size:12.5px;cursor:pointer;padding:4px 0;}
.bhq-dot-name{flex:0 0 auto;font-weight:700;}
.bhq-dot-leader{flex:1;border-bottom:1px dotted var(--hairline-strong);margin-bottom:3px;min-width:16px;}
.bhq-dot-value{flex:0 0 auto;font-variant-numeric:tabular-nums;font-weight:700;}
.bhq-cat-dot-row{display:flex;align-items:baseline;gap:6px;font-size:12px;padding:2px 0;}
.bhq-cat-dot-row .bhq-dot-name{font-weight:500;color:var(--text-dim);}
.bhq-cat-dot-row .bhq-dot-value{font-weight:700;}
.bhq-cat-detail{font-size:11px;color:var(--text-faint);margin:2px 0 4px 0;}
.bhq-subitem-row{display:flex;align-items:baseline;gap:6px;font-size:11px;color:var(--text-faint);padding:2px 0 2px 16px;}
.bhq-subitem-name{font-weight:500;}
.bhq-subitem-value{font-weight:700;color:var(--text-dim);}
.bhq-modal-current{display:flex;flex-direction:column;gap:2px;background:var(--panel-inner);border:1px solid var(--hairline);border-radius:var(--radius-sm);padding:10px 14px;}
.bhq-modal-current-label{font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text-faint);}
.bhq-modal-current-value{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums;}
.bhq-modal-delta{font-size:12px;font-weight:700;min-height:16px;margin:2px 0 0;}
.bhq-modal-delta.up{color:var(--green);}
.bhq-modal-delta.down{color:var(--red);}
.bhq-modal-footnote{font-size:11px;color:var(--text-faint);margin:0;}
.bhq-modal-actor{font-size:13px;font-weight:500;color:var(--text-dim);margin:0;}
.bhq-req-waiting{font-size:11px;color:var(--text-faint);white-space:nowrap;}
.bhq-month-block{border-bottom:1px solid var(--hairline);padding-bottom:8px;margin-bottom:4px;}
.bhq-month-block:last-child{border-bottom:none;}
.bhq-month-body{display:none;padding:4px 0 4px 6px;}
.bhq-billing-center{max-width:380px;margin:0 auto;}
.bhq-trend-dot{width:7px;height:7px;border-radius:50%;flex:0 0 auto;}
.bhq-trend-dot--up{background:var(--green);}
.bhq-trend-dot--down{background:var(--red);}
.bhq-note{font-size:12px;color:var(--text-faint);margin:0;}
.bhq-note code{background:var(--panel-inner);padding:1px 5px;border-radius:4px;font-size:11px;}
.bhq-upload-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.bhq-upload-row input[type=file]{font-size:12px;max-width:230px;color:var(--text-dim);}
.bhq-back{background:none;border:none;color:var(--teal-bright);font-size:12.5px;font-weight:700;cursor:pointer;font-family:inherit;padding:0;margin-bottom:14px;}
.bhq-collapse-toggle{background:none;border:none;padding:0;display:flex;align-items:center;gap:8px;cursor:pointer;font-family:inherit;}
.bhq-collapse-chevron{transition:transform 160ms var(--ease-out);color:var(--text-faint);}
.bhq-collapse-chevron.is-open{transform:rotate(90deg);}
.bhq-pay-toggle{display:flex;gap:6px;margin:2px 0 2px;}
.bhq-pay-btn{background:var(--surface);border:1px solid var(--hairline-strong);border-radius:999px;padding:6px 14px;font-size:11.5px;font-weight:700;color:var(--text-dim);cursor:pointer;font-family:inherit;}
.bhq-pay-btn:hover{border-color:var(--accent);color:var(--accent);}
.bhq-pay-btn.is-active{background:var(--accent);border-color:var(--accent);color:#fff;}
/* Filter bar above the ledger search: Paying / Non Paying and the service
   type segmented control on one line, wrapping on narrow screens. */
.bhq-filter-bar{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;}
.bhq-seg-toggle{display:inline-flex;border:1px solid var(--hairline-strong);border-radius:999px;padding:2px;background:var(--surface);}
.bhq-seg-btn{background:transparent;border:none;border-radius:999px;padding:5px 12px;font-size:11.5px;font-weight:700;color:var(--text-dim);cursor:pointer;font-family:inherit;}
.bhq-seg-btn:hover{color:var(--accent);}
.bhq-seg-btn.is-active{background:var(--accent);color:#fff;}
.bhq-seg-btn:focus-visible, .bhq-pay-btn:focus-visible{outline:2px solid var(--teal);outline-offset:1px;}
/* Ledger cells. Service type is a one-letter badge before the advertiser
   name; the name gets the width the old Service type column used. */
/* One line per row (2026-10-27): a two-line agency group made its row taller
   than the rest and the cells stopped lining up. The name truncates with the
   full name in its tooltip; the +N marker stays visible beside it. The
   badge is centred on the name rather than hung from its top. */
.bhq-cell-channel{max-width:180px;white-space:nowrap;}
.bhq-chan-name{display:inline-block;max-width:150px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;}
.bhq-cell-adv{min-width:200px;}
.bhq-adv-name{display:inline-flex;align-items:center;gap:8px;}
.bhq-svc{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:5px;font-size:10px;font-weight:700;line-height:1;cursor:default;}
.bhq-svc--managed{color:var(--teal-bright);background:var(--teal-glow-soft);}
.bhq-svc--selfserve{color:var(--text-dim);background:color-mix(in srgb, var(--text-dim) 12%, transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--text-dim) 30%, transparent);}
.bhq-na{color:var(--text-faint);padding-left:10px;cursor:default;}
/* Drilldown: a quiet chevron, not a full outlined button on every row. */
.bhq-drill{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;border-radius:999px;border:1px solid var(--hairline-strong);background:var(--surface);color:var(--text-dim);cursor:pointer;transition:color 140ms var(--ease-out),border-color 140ms var(--ease-out),transform 160ms var(--ease-out);}
.bhq-drill:hover{color:var(--accent);border-color:var(--accent);}
.bhq-drill:focus-visible{outline:2px solid var(--teal);outline-offset:1px;}
.bhq-drill svg{transition:transform 160ms var(--ease-out);}
.bhq-drill[aria-expanded="true"]{color:#fff;background:var(--accent);border-color:var(--accent);}
.bhq-drill[aria-expanded="true"] svg{transform:rotate(90deg);}
/* The advertiser ledger's width was set by its headers (uppercase, spaced,
   never wrapping) and 14px gutters on ten columns, which pushed it past the
   panel on All. Tighter gutters, and two-word headers may wrap. */
.bhq-ledger--adv tbody td, .bhq-ledger--adv .bhq-total-row td{padding-left:10px;padding-right:10px;}
.bhq-ledger--adv thead th{white-space:normal;}
.bhq-ledger--adv .bhq-sort{padding:9px 10px;line-height:1.35;}
.bhq-ledger--adv .bhq-th--right .bhq-sort{text-align:right;}
/* Set by fitLedgerWidth() in mockup-app.js only when the table is wider
   than its panel; otherwise the wrapper stays unclipped so the header and
   total row can pin to the viewport. */
.bhq-ledger-wrap.is-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.bhq-sr-only{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.bhq-tri-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;}
@media (max-width:760px){ .bhq-tri-grid{grid-template-columns:1fr;} }
.bhq-export-card{background:var(--panel-inner);border:1px solid var(--hairline);border-top:3px solid var(--accent);border-radius:var(--radius-md);padding:16px 18px;display:flex;flex-direction:column;gap:10px;}
.bhq-export-card--wide{grid-column:1 / -1;}
.bhq-explain{border:1px solid var(--hairline);border-radius:var(--radius-md);padding:12px 16px;background:var(--panel-inner);font-size:13px;line-height:1.5;}
.bhq-explain ol{margin:6px 0 0 18px;padding:0;}
.bhq-explain li{margin:4px 0;}
.bhq-explain h5{margin:10px 0 0;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-faint);}
/* Stream Holdco products card (Admin > Uploads) and the ledger status line. */
.bhq-hf-rows{display:flex;flex-direction:column;gap:8px;}
.bhq-hf-row{display:grid;grid-template-columns:minmax(180px,1.1fr) minmax(200px,1.4fr) auto;gap:6px 14px;align-items:center;padding:8px 0;border-top:1px solid var(--hairline);}
.bhq-hf-row:first-child{border-top:0;}
.bhq-hf-name{font-weight:700;font-size:13px;}
.bhq-hf-name .bhq-note{display:block;font-weight:400;}
.bhq-hf-state{font-size:12.5px;color:var(--text-dim);}
@media (max-width:760px){ .bhq-hf-row{grid-template-columns:1fr;} }
.bhq-hf-preview-title{margin:10px 0 4px;font-weight:700;font-size:13px;}
.bhq-hf-notes{margin:8px 0;padding-left:18px;font-size:12.5px;color:var(--text-dim);}
.bhq-hf-notes li{margin:3px 0;}
.bhq-hf-notes details{display:inline;}
/* A product's messages and review sit under its row, full width. */
.bhq-hf-row > .bhq-hf-msg,.bhq-hf-row > .bhq-hf-preview{grid-column:1 / -1;}
.bhq-hf-msg:empty{display:none;}
.bhq-hf-msg .bhq-modal-status{display:block;}
.bhq-hf-unmapped{margin-top:6px;font-size:12.5px;}
.bhq-hf-unmapped summary{cursor:pointer;color:var(--text-dim);}
.bhq-hf-unmapped table{margin:6px 0 4px;}
.bhq-hf-unmapped th,.bhq-hf-unmapped td{padding:3px 10px;font-size:12px;vertical-align:top;}
/* Stream Holdco channel context (2026-10-19): Admin's channel differences
   list, the ledger Channel cell's +N marker and the drilldown's Channels. */
.bhq-hf-diffs{margin-top:12px;padding-top:10px;border-top:1px solid var(--hairline);}
.bhq-hf-diffs:empty{display:none;}
.bhq-hf-diffs .bhq-note{display:block;margin:4px 0;}
.bhq-chan-more{display:inline-block;margin-left:4px;padding:0 5px;border-radius:8px;font-size:10.5px;font-weight:700;line-height:16px;color:var(--text-dim);background:var(--panel-inner);border:1px solid var(--hairline-strong);cursor:help;}
.bhq-chan-block{border-bottom:1px solid var(--hairline);padding:4px 0 8px;margin-bottom:4px;}
.bhq-chan-row{display:flex;gap:10px;font-size:11.5px;color:var(--text-dim);padding:2px 0 2px 16px;}
.bhq-chan-k{flex:0 0 120px;font-weight:500;color:var(--text-faint);}
.bhq-chan-v{flex:1;}
.bhq-chan-by{font-weight:700;}
.bhq-chan-by--media{color:var(--teal-bright);}
.bhq-hf-reg{min-width:260px;}
.bhq-hf-reg .bhq-upload-row{margin-top:4px;gap:6px;}
.bhq-hf-reg .bhq-note{margin-bottom:3px;}
.bhq-hf-reg button[data-hf-reg-suggest]{white-space:normal;text-align:left;}
.bhq-holdco-status{margin:0 0 12px;font-size:12.5px;color:var(--text-dim);}
.bhq-holdco-status strong{color:var(--text);}

/* ==========================================================================
   Ledger -- sortable column headers and the result-set total row
   ========================================================================== */
.bhq-th-sort{padding:0;}
.bhq-th--right{text-align:right;}
.bhq-th--center{text-align:center;}
.bhq-sort{
  display:inline-flex;align-items:center;gap:5px;width:100%;
  background:none;border:none;cursor:pointer;font-family:inherit;
  font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:var(--text-faint);padding:9px 14px;border-radius:var(--radius-sm);
  transition:color 140ms var(--ease-out),background 140ms var(--ease-out);
}
.bhq-th--right .bhq-sort{justify-content:flex-end;}
.bhq-th--center .bhq-sort{justify-content:center;}
.bhq-sort:hover{color:var(--text);background:var(--row-hover);}
.bhq-sort:focus-visible{outline:2px solid var(--teal);outline-offset:-2px;}
.bhq-sort.is-active{color:var(--teal-bright);}
/* Inactive columns show a dimmed both-ways caret so it is discoverable that
   the header sorts at all, without competing with the active column. */
.bhq-sort-caret{font-size:10px;line-height:1;letter-spacing:-0.18em;opacity:.7;}
.bhq-sort.is-active .bhq-sort-caret{opacity:1;letter-spacing:normal;font-size:10px;}

/* The Nexstar Non Paying list is 612 rows / ~50,000px tall, so a header at
   the top and a total at the bottom are both off-screen for 70-odd screens
   of scrolling. Pinning them keeps the sort controls reachable and the
   totals in view wherever you are in the list. Backgrounds must be opaque
   here -- the translucent panel tokens would let rows show through. */
.bhq-ledger thead th{
  position:sticky;top:0;z-index:2;
  background:var(--surface);
  box-shadow:inset 0 -1px 0 var(--hairline);
}
/* The totals used to sit on the same --surface as the rows above with their
   figures a shade dimmer than the data they summarise, so the one row you
   most want to find at the bottom of 600 was the one that receded. It is now
   a distinct band: a neutral tint away from the row fill, a rule in the
   channel's own accent, and figures at full text contrast rather than dimmed.
   The tint is mixed from --text so it lands correctly in both themes without
   a second set of values to keep in step. */
.bhq-total-row td{
  position:sticky;bottom:0;z-index:2;
  border-top:2px solid var(--accent);border-bottom:none;
  padding:14px;font-variant-numeric:tabular-nums;
  background:color-mix(in srgb, var(--text) 7%, var(--surface));
  box-shadow:0 -8px 22px color-mix(in srgb, var(--text) 13%, transparent);
}
.bhq-total-label{display:block;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text);}
.bhq-total-sub{display:block;margin-top:3px;font-size:12px;color:var(--text-dim);}
.bhq-total-sub b{color:var(--text);font-weight:700;}
.bhq-total-fee{text-align:right;font-size:16px;font-weight:700;color:var(--text);vertical-align:middle;white-space:nowrap;}
/* Total revenue is the figure people come to this row for, so it stays a
   step larger than the two it is composed of. */
.bhq-total-revenue{font-size:19px;}
.bhq-total-open{text-align:center;font-weight:700;color:var(--text);vertical-align:middle;}

/* Above 900px the wrapper has no overflow, which is what lets the sticky
   header and total row position against the viewport. Below it, horizontal
   scrolling matters more than stickiness, so the wrapper becomes a scroll
   container and the table keeps a usable minimum width. */
@media (max-width:1050px){
  /* Raised from 900px/860px (2026-09): the advertiser ledger grew from 8 to
     9 columns everywhere (a CSM column) and 10 on Direct/Agency/Enterprise
     (CSM + Sales), so the point it needs a scrollbar instead of squeezing
     moved out with it. */
  .bhq-ledger-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .bhq-ledger{min-width:980px;}
}
/* The change log table carries ten columns (When, Who, What changed,
   Advertiser, OHQID, From, To, Effective month, Reason, Cycle) against the
   advertiser ledger's eight, so the same 900px cutoff left it squeezed on
   an ordinary laptop screen -- Reason and neighboring columns crowded each
   other rather than the row ever getting a scrollbar. Give it its own,
   earlier breakpoint and a wider floor instead of stretching the shared one. */
@media (max-width:1300px){
  .bhq-ledger-wrap--log{overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .bhq-ledger--log{min-width:1220px;}
}

/* Announced to screen readers on every search; visually it doubles as the
   result count, so it is not hidden. */
.bhq-result-status{margin:-4px 0 0;font-size:11.5px;color:var(--text-faint);min-height:15px;}
/* Change log filters: wrap onto as many rows as they need, and let the
   advertiser search take the slack so the selects stay their natural size. */
.bhq-log-filters{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:flex-end;margin-bottom:10px;}
.bhq-log-filters .bhq-field{margin:0;}
.bhq-log-filters .bhq-field.grow{flex:1 1 260px;min-width:220px;}
/* A max-width alone doesn't reliably cap a column under table-layout:auto,
   and a long reason with few spaces (a pasted ticket link, a run-on note)
   can push past it instead of wrapping -- overflow-wrap:anywhere forces a
   break inside a word rather than letting the line run past the cell and
   visibly spill over neighboring columns. */
.bhq-log-reason{color:var(--text-dim);max-width:38ch;white-space:normal;overflow-wrap:anywhere;}

/* CSM/Sales assignment cells: a plain, compact select rather than the
   panel-style fields above -- it sits inline in a dense ledger row, not a
   form, so it should read as part of the table, not a form control dropped
   into it. Autosaves on change (see advertiserRowHtml/wireAdvertiserRowButtons
   in mockup-app.js); disabled while a write is in flight. */
.bhq-assign-select{font-size:12.5px;padding:5px 8px;border:1px solid var(--hairline-strong);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);font-family:inherit;width:140px;text-overflow:ellipsis;}
.bhq-assign-select:disabled{opacity:.55;}
.bhq-checkbox-label{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--text-dim);white-space:nowrap;cursor:pointer;}
.bhq-checkbox-label input{margin:0;}
.bhq-log-when{white-space:nowrap;color:var(--text-dim);}
.bhq-log-empty{padding:28px 12px;text-align:center;}
.bhq-log-empty .bhq-log-empty-title{font-size:13px;font-weight:700;color:var(--text-dim);margin:0 0 4px;}
.bhq-log-empty p{font-size:12px;color:var(--text-faint);margin:0;}
.bhq-log-more td{text-align:center;padding:14px 12px;}
.bhq-whodunit-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;padding-top:10px;border-top:1px solid var(--hairline);}
/* The cycle bar replaced a plain line of text, so it keeps that line's
   vertical rhythm and wraps rather than pushing the layout wide. */
.bhq-cycle{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.bhq-cycle-label{font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text-faint);}
.bhq-cycle-picker{font-family:inherit;font-size:12.5px;font-weight:700;color:var(--text);background:var(--panel-inner);border:1px solid var(--hairline-strong);border-radius:var(--radius-sm);padding:4px 8px;cursor:pointer;}
.bhq-cycle-picker:hover{border-color:var(--panel-border-strong);}
.bhq-cycle-note{font-size:11px;color:var(--text-faint);}
.bhq-review-mode{display:flex;gap:8px;align-items:flex-start;margin:6px 0 10px;cursor:pointer;}
.bhq-review-mode input{margin-top:2px;}

/* The upload freshness strip. Louder than the cycle note it sits under:
   the date is the biggest text between the tabs and the stat cards, and the
   whole strip goes amber when the cycle has no spend file at all. */
.bhq-freshness{
  display:flex;align-items:baseline;gap:8px 14px;flex-wrap:wrap;
  margin:-4px 0 16px;padding:12px 16px;border-radius:var(--radius-sm);
  border:1px solid var(--panel-border-strong);border-left:5px solid var(--teal-bright);
  background:var(--teal-glow-soft);color:var(--text);line-height:1.35;
}
.bhq-freshness:empty{display:none;}
.bhq-freshness-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.12em;color:var(--teal-bright);white-space:nowrap;}
.bhq-freshness-when{font-size:18px;font-weight:700;letter-spacing:-.01em;}
.bhq-freshness-ago{font-size:12.5px;font-weight:700;color:var(--text-dim);}
.bhq-freshness-detail{font-size:12px;color:var(--text-dim);flex-basis:100%;}
.bhq-freshness-detail code{font-size:11.5px;background:var(--panel-inner);border:1px solid var(--hairline);border-radius:3px;padding:1px 5px;color:var(--text);}
.bhq-freshness--missing{
  border-color:var(--amber);border-left-color:var(--amber);
  background:color-mix(in srgb,var(--amber) 12%,transparent);
}
.bhq-freshness--missing .bhq-freshness-label{color:var(--amber);}

/* The debug banner. Deliberately louder than anything else on the page, and
   striped so it cannot be mistaken for part of the product's own chrome. */
.bhq-debug-banner{
  display:flex;align-items:flex-start;gap:10px;
  margin:0 0 14px;padding:11px 14px;border-radius:var(--radius-sm);
  border:1px solid var(--amber);
  background:repeating-linear-gradient(135deg,color-mix(in srgb,var(--amber) 12%,transparent) 0 12px,transparent 12px 24px);
  color:var(--text);font-size:12.5px;line-height:1.45;
}
.bhq-debug-banner strong{color:var(--amber);text-transform:uppercase;letter-spacing:.06em;font-size:11px;white-space:nowrap;padding-top:1px;}
.bhq-debug-banner code{font-size:11.5px;background:var(--panel-inner);border:1px solid var(--hairline);border-radius:3px;padding:1px 4px;}

/* The fee lock countdown (2026-10-13): time left before Managed and Self
   Service platform fees lock. Calm until the last week, amber inside it,
   red in the final 24 hours. */
.bhq-lock-countdown{margin:0 0 14px;padding:12px 14px;border-radius:var(--radius-md);
  border:1px solid var(--panel-border);background:var(--panel);}
.bhq-lock-countdown-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;font-size:13px;}
.bhq-lock-countdown-head span{color:var(--text-faint);font-size:12px;}
.bhq-lock-countdown-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;margin-top:10px;}
.bhq-lock-tile{padding:10px 12px;border-radius:var(--radius-sm);border:1px solid var(--hairline-strong);background:var(--panel-inner);}
.bhq-lock-tile.is-warn{border-color:var(--amber);background:color-mix(in srgb,var(--amber) 10%,transparent);}
.bhq-lock-tile.is-hot{border-color:var(--red);background:color-mix(in srgb,var(--red) 12%,transparent);}
.bhq-lock-tile.is-locked{background:var(--surface-translucent);}
.bhq-lock-tile-head{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12.5px;}
.bhq-lock-tile-name{display:inline-flex;align-items:center;gap:6px;font-weight:600;}
.bhq-lock-tile-when{color:var(--text-dim);font-size:12px;}
.bhq-lock-tile-count{margin-top:6px;font-size:22px;font-weight:600;font-variant-numeric:tabular-nums;}
.bhq-lock-tile-count small{font-size:11px;font-weight:400;color:var(--text-dim);margin-left:1px;}
.bhq-lock-tile.is-locked .bhq-lock-tile-count{font-size:18px;color:var(--text-dim);}
.bhq-lock-tile-note{margin-top:4px;font-size:12px;color:var(--text-dim);}
.bhq-lock-tile.is-warn .bhq-lock-tile-note{color:var(--amber);}
.bhq-lock-tile.is-hot .bhq-lock-tile-note{color:var(--red);}

/* Sandbox mode (2026-09-30): the debug banner's amber stripes, pinned to the
   top so it stays in view while scrolling a long ledger, plus an amber rule
   around the page so a sandbox tab reads differently at a glance. */
.bhq-sandbox-banner{position:sticky;top:0;z-index:250;align-items:center;flex-wrap:wrap;
  background-color:var(--surface);
  background-image:repeating-linear-gradient(135deg,color-mix(in srgb,var(--amber) 16%,transparent) 0 12px,transparent 12px 24px);}
.bhq-sandbox-banner .bhq-sandbox-text{flex:1;min-width:240px;}
.bhq-sandbox-actions{display:flex;gap:8px;flex-wrap:wrap;}
.bhq-sandbox-banner .bhq-modal-status{flex-basis:100%;}
html.bhq-is-sandbox body{box-shadow:inset 0 0 0 3px var(--amber);}
.bhq-sandbox-panel{border-color:color-mix(in srgb,var(--amber) 45%,var(--panel-border));}

/* Idle warning: a notice, not a modal. It must not block the page, because
   the whole point is to let you carry on with what you were doing. */
.bhq-idle-warn{
  position:fixed;right:20px;bottom:20px;z-index:300;max-width:min(340px,calc(100vw - 40px));
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  padding:14px 16px;border-radius:var(--radius-md);
  background:var(--surface);border:1px solid var(--panel-border-strong);
  box-shadow:var(--shadow-modal);
}
.bhq-idle-warn-body{display:flex;flex-direction:column;gap:2px;flex:1;min-width:150px;}
.bhq-idle-warn b{font-size:13px;font-weight:700;color:var(--text);}
.bhq-idle-warn span{font-size:12px;color:var(--text-faint);font-variant-numeric:tabular-nums;}
@media (prefers-reduced-motion: no-preference){
  .bhq-idle-warn{animation:bhq-idle-in 200ms var(--ease-out);}
  @keyframes bhq-idle-in{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:none;}}
}

/* ==========================================================================
   Loader -- shown in the tab panel while the All tab renders the whole book.
   The mark is the header wordmark cropped to its hexagon (see loaderHtml in
   mockup-app.js); the ring follows --text so it reads on both themes.
   ========================================================================== */
.bhq-loader{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;min-height:260px;padding:40px 16px;color:var(--text);}
.bhq-loader-mark{width:44px;height:50px;}
.bhq-loader-mark svg{width:100%;height:100%;display:block;color:var(--text);}
.bhq-loader-text{font-size:12.5px;color:var(--text-faint);letter-spacing:.02em;}
/* The full-page variant (app/page.js, cycle switch) and the 150ms hold-back:
   anything that finishes sooner never shows a loader at all. */
.bhq-loader--page{min-height:70vh;}
.bhq-loader--delayed{opacity:0;animation:bhq-loader-in 180ms ease-out 150ms forwards;}
@keyframes bhq-loader-in{to{opacity:1;}}
@media (prefers-reduced-motion: no-preference){
  .bhq-loader-mark{animation:bhq-loader-pulse 1.4s ease-in-out infinite;}
  @keyframes bhq-loader-pulse{0%,100%{opacity:.45;transform:scale(.94);}50%{opacity:1;transform:scale(1);}}
}

/* ==========================================================================
   Sign-in -- ft-design-system hero pattern (logo, tagline, headline, blurb)
   ========================================================================== */
.bhq-auth-gate{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:20px;overflow:auto;}
.bhq-auth-shell{width:100%;max-width:400px;display:flex;flex-direction:column;gap:18px;}
.hero{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;}
.hero-logo{width:180px;}
.tagline{margin:4px 0 0;font-size:10.5px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--teal-bright);}
.login-heading{margin:0;font-size:22px;font-weight:700;letter-spacing:-0.02em;color:var(--text);}
.hero-blurb{margin:0;font-size:12.5px;line-height:1.5;color:var(--text-faint);max-width:34ch;}

/* The modal's own gap only spaces its direct children, so the intro copy,
   field and status inside a step were butting together. */
#authStepEmail, #authStepCode{display:flex;flex-direction:column;gap:12px;}

/* ---- Variance view -------------------------------------------------- */
.bhq-var-pickers{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:flex-end;}
.bhq-var-side-note{display:flex;gap:6px;align-items:center;font-size:11px;color:var(--text-faint);margin-top:4px;}
.bhq-var-banner{margin:0;padding:10px 12px;border-radius:var(--radius-sm);font-size:12.5px;color:var(--amber);background:color-mix(in srgb, var(--amber) 12%, transparent);border:1px solid color-mix(in srgb, var(--amber) 35%, transparent);}
.bhq-var-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;}
@media (max-width:1100px){.bhq-var-cards{grid-template-columns:1fr 1fr;}}
.bhq-var-delta{font-variant-numeric:tabular-nums;font-weight:700;}
.bhq-var-delta.up{color:var(--green);}
.bhq-var-delta.down{color:var(--red);}
.bhq-var-bridge{height:240px;position:relative;}
.bhq-var-bridge-table{max-width:560px;}
.bhq-var-total-row td{font-weight:700;border-top:2px solid var(--accent);}
/* Twelve columns on the advertiser list. Money and counts stay on one line,
   the two text columns (advertiser or channel, then channel name) may wrap,
   and the wrapper scrolls sideways at any width rather than letting the
   table spill past the panel edge -- the shared ledger wrap only scrolls
   below 1050px, which is too late for a table this wide. */
.bhq-var-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.bhq-var-table td{white-space:nowrap;}
.bhq-var-table td:first-child,.bhq-var-table td:nth-child(2){white-space:normal;max-width:240px;font-variant-numeric:normal;}
.bhq-var-table td:first-child .bhq-pill{display:inline-block;margin-top:2px;}
.bhq-var-link{background:none;border:none;padding:0;color:var(--teal-bright);font:inherit;font-weight:700;cursor:pointer;}
.bhq-var-link:hover{text-decoration:underline;}
.bhq-var-zero{color:var(--text-faint);}
.bhq-var-channel-row.is-active td{background:var(--row-hover);}
.bhq-var-split{width:auto;margin:4px 0 4px 24px;font-size:12px;}
.bhq-var-split td{padding:4px 14px;}
.bhq-var-movers{display:grid;grid-template-columns:1fr 1fr;gap:20px;}
@media (max-width:900px){.bhq-var-movers{grid-template-columns:1fr;}}
.bhq-var-movers-col{display:flex;flex-direction:column;gap:6px;}
.bhq-var-mover{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:baseline;font-size:12.5px;padding:3px 0;border-bottom:1px solid var(--hairline);}
.bhq-var-mover-ch{font-size:11px;color:var(--text-faint);}
.bhq-var-chips{display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.bhq-var-toggle{font-size:12px;color:var(--text-dim);display:flex;gap:6px;align-items:center;margin-left:8px;}
.bhq-var-drill{max-width:760px;margin:0 auto;padding:10px 16px 6px;}
.bhq-var-drill-cols{display:flex;justify-content:flex-end;font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text-faint);margin-bottom:6px;}
.bhq-var-drill-nums{display:grid;grid-template-columns:110px 110px 120px;text-align:right;font-variant-numeric:tabular-nums;gap:8px;}
.bhq-pill--mv-new,.bhq-pill--cat-added,.bhq-pill--prod-added{color:var(--teal-bright);background:var(--teal-glow-soft);}
.bhq-pill--mv-returning{color:var(--teal-bright);background:var(--teal-glow-soft);}
.bhq-pill--mv-increased,.bhq-pill--cat-increased,.bhq-pill--prod-up{color:var(--green);background:color-mix(in srgb, var(--green) 14%, transparent);}
.bhq-pill--mv-reduced,.bhq-pill--cat-reduced,.bhq-pill--prod-down{color:var(--amber);background:color-mix(in srgb, var(--amber) 14%, transparent);}
.bhq-pill--mv-churned,.bhq-pill--cat-zeroed,.bhq-pill--prod-dropped{color:var(--red);background:color-mix(in srgb, var(--red) 14%, transparent);}
.bhq-pill--mv-unchanged,.bhq-pill--cat-unchanged,.bhq-pill--prod-flat{color:var(--text-faint);background:color-mix(in srgb, var(--slate) 16%, transparent);}
.bhq-var-warn{color:var(--amber);}

/* ==========================================================================
   What's new -- release notes pill in the top bar and the list it opens.
   Entries come from public/whats-new.json; the dot means unseen on this
   browser (localStorage), nothing more.
   ========================================================================== */
.bhq-whatsnew-btn{position:relative;}
.bhq-whatsnew-dot{position:absolute;top:-3px;right:-3px;width:9px;height:9px;border-radius:50%;background:var(--teal-bright);border:2px solid var(--panel);}
.bhq-release-list{display:flex;flex-direction:column;gap:18px;}
.bhq-release-day{font-size:10.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text-faint);padding-bottom:6px;border-bottom:1px solid var(--hairline);}
.bhq-release{display:flex;flex-direction:column;gap:4px;padding:2px 0;}
.bhq-release-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.bhq-release-title{font-size:13.5px;font-weight:700;color:var(--text);margin:0;}
.bhq-release-area{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--teal);background:color-mix(in srgb,var(--teal) 12%,transparent);border-radius:999px;padding:2px 8px;}
.bhq-release-body{font-size:12.5px;line-height:1.5;color:var(--text-dim);margin:0;}

/* ---- Key Account Radar (public/radar-view.js) ---- */
.bhq-radar-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-top:16px;}
@media (max-width:1100px){.bhq-radar-cards{grid-template-columns:1fr 1fr;}}
@media (max-width:560px){.bhq-radar-cards{grid-template-columns:1fr;}}
.bhq-radar-card{background:var(--panel-inner);border:1px solid var(--hairline);border-top:3px solid var(--accent);border-radius:var(--radius-md);padding:14px 16px;display:flex;flex-direction:column;gap:6px;}
.bhq-radar-card-label{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text-dim);}
.bhq-radar-card-value{font-size:22px;font-weight:700;color:var(--text);font-variant-numeric:tabular-nums;}
.bhq-radar-head{flex-wrap:wrap;gap:8px;}
.bhq-radar-head .bhq-panel-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-variant-numeric:tabular-nums;}
.bhq-radar-subtitle{font-size:13px;}
.bhq-radar-channel{border-top:1px solid var(--hairline);padding-top:12px;display:flex;flex-direction:column;gap:10px;}
.bhq-radar-tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.bhq-radar-table{width:100%;}
.bhq-radar-table th,.bhq-radar-table td{white-space:nowrap;vertical-align:middle;}
.bhq-radar-table .bhq-num{text-align:right;font-variant-numeric:tabular-nums;}
.bhq-radar-rank{width:28px;color:var(--text-faint);font-weight:700;}
.bhq-radar-name{font-weight:700;color:var(--text);white-space:normal;min-width:160px;}
.bhq-radar-sub{font-size:11px;color:var(--text-faint);}
.bhq-radar-spark{display:block;}
.bhq-radar-chg{font-weight:700;}
.bhq-radar-chg--up{color:var(--green);}
.bhq-radar-chg--down{color:var(--red);}
.bhq-radar-chg--flat{color:var(--text-dim);}
.bhq-radar-pct{font-weight:400;font-size:11px;}
.bhq-radar-cov--complete{color:var(--green);background:color-mix(in srgb, var(--green) 14%, transparent);}
.bhq-radar-cov--pending{color:var(--amber);background:color-mix(in srgb, var(--amber) 14%, transparent);}
.bhq-radar-cov--none{color:var(--red);background:color-mix(in srgb, var(--red) 14%, transparent);}
.bhq-radar-sponsor{min-width:150px;}
.bhq-radar-rowerr{font-size:11px;color:var(--red);white-space:normal;max-width:220px;}
.bhq-radar-toggle{display:inline-flex;border:1px solid var(--hairline-strong);border-radius:999px;overflow:hidden;}
.bhq-radar-toggle button{background:transparent;border:0;color:var(--text-dim);padding:7px 14px;font:inherit;font-size:12px;font-weight:700;cursor:pointer;}
.bhq-radar-toggle button[aria-pressed="true"]{background:var(--teal-glow-soft);color:var(--teal-bright);}

/* ---- Spend by agency group (ledger, renderAgencyPanel) ---- */
.bhq-agency-table .bhq-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;}
.bhq-agency-table .bhq-agency-total{font-weight:700;color:var(--text);}
.bhq-agency-table tbody tr.is-selected td{background:var(--teal-glow-soft);}
.bhq-agency-link{background:none;border:0;padding:0;font:inherit;font-weight:700;color:var(--text);cursor:pointer;text-align:left;}
.bhq-agency-link:hover,.bhq-agency-link[aria-pressed="true"]{color:var(--teal-bright);text-decoration:underline;}
.bhq-agency-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 6px 4px 12px;border-radius:999px;font-size:12px;font-weight:700;color:var(--teal-bright);background:var(--teal-glow-soft);border:1px solid color-mix(in srgb, var(--teal) 35%, transparent);}
#agencyBody[hidden]{display:none;}

/* ---- Stream Holdco products (ledger, Stream Holdco tab, renderHoldcoProductsPanel) ---- */
#holdcoProductsPanel[hidden],#holdcoProductsBody[hidden]{display:none;}
.bhq-holdco-products-table td.bhq-note{white-space:nowrap;}
.bhq-holdco-products-recon{margin:10px 0 0;font-size:12.5px;color:var(--amber);}
.bhq-admin-subnav{margin-top:12px;}
/* Admin's line about the nightly Snowflake copy (spec 2026-10-15, section 8).
   Amber when the last good night is over 26 hours old or the last run stopped. */
.bhq-copy-status{margin:8px 0 12px;font-size:13px;color:var(--slate);}
.bhq-copy-status--amber{color:var(--amber);}

/* ---- My Book (spec 2026-10-19) ---- */
.bhq-mybook-head{flex-wrap:wrap;gap:8px;align-items:flex-start;}
.bhq-mybook-head .bhq-panel-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
/* My Book reads as a page, not a panel of switches (2026-10-27): a plain
   title, the month and counts under it, sentence-case labels, and the
   explanations behind an info mark or a link rather than in full on screen. */
.bhq-mybook-title{font-size:20px;letter-spacing:-0.01em;}
.bhq-mybook-sub{font-size:13px;color:var(--text-dim);margin:4px 0 0;}
.bhq-mybook-who{font-size:12.5px;color:var(--text-faint);margin:4px 0 0;max-width:720px;line-height:1.45;}
.bhq-mybook-info{display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;border-radius:50%;border:1px solid var(--text-faint);color:var(--text-faint);font-size:10px;font-weight:700;font-style:normal;line-height:1;vertical-align:1px;margin-left:4px;cursor:help;}
.bhq-mybook-info:hover,.bhq-mybook-info:focus-visible{border-color:var(--teal);color:var(--teal);outline:none;}
.bhq-mybook-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0 14px;padding:10px 0;border-top:1px solid var(--hairline);border-bottom:1px solid var(--hairline);}
.bhq-mybook-bar-side{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.bhq-mybook-bar .bhq-switch{font-size:12.5px;font-weight:500;color:var(--text-dim);}
.bhq-mybook-bar .bhq-switch:has(input:checked){color:var(--text);}
.bhq-mybook-bar .bhq-seg-btn{font-weight:500;font-size:12px;}
#myBookBudgetSlot:empty{display:none;}
.bhq-mybook-link{background:none;border:0;padding:4px 2px;font-family:inherit;font-size:12.5px;font-weight:500;color:var(--teal);cursor:pointer;white-space:nowrap;}
.bhq-mybook-link:hover{text-decoration:underline;}
.bhq-mybook-link:disabled{color:var(--text-faint);cursor:default;text-decoration:none;}
.bhq-mybook-link:focus-visible{outline:2px solid var(--teal);outline-offset:2px;border-radius:4px;}
.bhq-mybook-ddcap{color:var(--text-faint);}
.bhq-mybook-quiet{margin:0 0 12px;font-size:12.5px;color:var(--text-faint);}
.bhq-mybook-dd{position:relative;}
.bhq-mybook-ddbtn{min-width:200px;min-height:32px;display:flex;justify-content:space-between;align-items:center;gap:10px;background:var(--panel-inner);color:var(--text);border:1px solid var(--hairline-strong);border-radius:var(--radius-sm);padding:7px 10px;font-family:inherit;font-size:12.5px;cursor:pointer;text-align:left;}
.bhq-mybook-ddbtn:hover,.bhq-mybook-ddbtn[aria-expanded="true"]{border-color:var(--teal);}
.bhq-mybook-ddbtn .bhq-sort-caret{color:var(--text-faint);font-size:10px;}
.bhq-mybook-menu{position:absolute;top:calc(100% + 4px);left:0;z-index:40;min-width:300px;max-height:380px;overflow:auto;background:var(--surface);border:1px solid var(--hairline-strong);border-radius:var(--radius-md);box-shadow:var(--shadow-modal);padding:6px 0;}
.bhq-mybook-group{padding:4px 0;border-top:1px solid var(--hairline);}
.bhq-mybook-group:first-child{border-top:0;}
/* Scoped to .bhq-mybook-dd, not .bhq-field: the filter bar has no field
   wrapper since 2026-10-27, and without these the options fall back to
   inline labels and the checkboxes lose their size. */
.bhq-mybook-dd .bhq-mybook-grouphead{display:flex;align-items:center;gap:8px;padding:6px 12px;font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--text-faint);cursor:pointer;}
.bhq-mybook-dd .bhq-mybook-opt{display:flex;align-items:center;gap:8px;padding:5px 12px 5px 30px;font-size:12.5px;font-weight:400;letter-spacing:0;text-transform:none;color:var(--text);cursor:pointer;white-space:nowrap;}
.bhq-mybook-opt:hover,.bhq-mybook-grouphead:hover{background:var(--surface-hover);}
.bhq-mybook-dd .bhq-mybook-menu input[type="checkbox"]{margin:0;padding:0;min-width:0;width:14px;height:14px;flex:none;accent-color:var(--teal);}
.bhq-mybook-count{margin-left:auto;color:var(--text-faint);font-variant-numeric:tabular-nums;font-weight:400;}
.bhq-mybook-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0 0 12px;}
@media (max-width:560px){.bhq-mybook-cards{grid-template-columns:1fr;}}
.bhq-mybook-kpi{background:var(--panel-inner);border:1px solid var(--hairline);border-radius:var(--radius-md);padding:14px 18px;}
.bhq-mybook-kpi-label{font-size:13px;color:var(--text-dim);}
.bhq-mybook-kpi-value{font-size:26px;font-weight:700;letter-spacing:-0.02em;font-variant-numeric:tabular-nums;margin-top:4px;}
.bhq-mybook-spend{color:var(--amber);font-weight:600;}
/* Unbilled spend is one neutral line; amber only from UNBILLED_ALERT_AT
   in mybook-view.js, so a few dollars do not read as an incident. */
.bhq-mybook-unbilled{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border:1px solid var(--hairline-strong);border-radius:var(--radius-sm);padding:9px 12px;margin:0 0 6px;font-size:13px;color:var(--text-dim);}
.bhq-mybook-unbilled strong{color:var(--text);}
.bhq-mybook-unbilled-text{flex:1;min-width:220px;}
.bhq-mybook-unbilled-mark{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;border:1px solid currentColor;font-size:10px;font-weight:700;flex:none;}
.bhq-mybook-unbilled.is-alert{border-color:var(--amber);}
.bhq-mybook-unbilled.is-alert .bhq-mybook-unbilled-mark{color:var(--amber);}
.bhq-mybook-why{margin:0 0 6px;padding:0 2px;font-size:12.5px;}
.bhq-mybook-tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.bhq-mybook-table{width:100%;}
.bhq-mybook-table th,.bhq-mybook-table td{white-space:nowrap;vertical-align:middle;}
.bhq-mybook-table .bhq-num{text-align:right;font-variant-numeric:tabular-nums;}
.bhq-mybook-table .bhq-mybook-name{white-space:normal;min-width:180px;}
.bhq-mybook-advname{display:block;font-weight:600;color:var(--text);}
.bhq-mybook-advsub{display:block;font-size:12px;color:var(--text-faint);margin-top:1px;}
.bhq-mybook-nil{color:var(--text-faint);}
.bhq-mybook-table{margin-top:10px;}
.bhq-mybook-table .bhq-sort{font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--text-dim);}
.bhq-mybook-table .bhq-sort.is-active{color:var(--text);}
.bhq-mybook-table .bhq-sort.is-active .bhq-sort-caret{color:var(--teal);}
.bhq-mybook-table .bhq-sort:not(.is-active) .bhq-sort-caret{opacity:0;transition:opacity 120ms var(--ease-out);}
.bhq-mybook-table th:hover .bhq-sort:not(.is-active) .bhq-sort-caret,.bhq-mybook-table .bhq-sort:focus-visible .bhq-sort-caret{opacity:.6;}
.bhq-mybook-table tfoot td{font-weight:700;border-top:1px solid var(--hairline-strong);}
.bhq-mybook-empty{padding:32px 16px;text-align:center;color:var(--text-dim);font-size:13px;}
.bhq-mybook-chip{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;color:var(--teal-bright);}
.bhq-roster-email{white-space:nowrap;}
.bhq-roster-email input{width:190px;margin-right:6px;}
.bhq-roster-email-auto{margin-left:6px;font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;}

/* ---- Admin Sign-ins (2026-10-19) ---- */
[data-admin-section="signins"] .bhq-num{text-align:right;font-variant-numeric:tabular-nums;}
[data-admin-section="signins"] td .bhq-note{margin-left:6px;}
[data-admin-section="signins"] td .bhq-ghost{margin-left:6px;padding:3px 9px;}
.bhq-digest-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.bhq-digest-controls .bhq-digest-to input{min-width:230px;padding:5px 10px;font-size:12px;}
a.bhq-ghost{display:inline-block;text-decoration:none;}
.bhq-ghost:disabled,.bhq-ghost[aria-disabled="true"]{opacity:.4;cursor:not-allowed;pointer-events:none;}

/* ==========================================================================
   Ledger UI refresh (2026-10-27, Amol)
   A calmer, less technical surface: one nav with an active view, a page
   header with the month as its title, a quiet deadline strip, underlined
   tabs, figure tiles, one mix card in place of the charts, one filter bar,
   and a quieter table. Sentence case throughout: no uppercase, letter-spaced
   micro labels. Display only; every figure and control is unchanged.
   Later rules here override the earlier ones on purpose.
   ========================================================================== */

/* Ground and surfaces: flat page, solid white cards, one border weight. */
body{background:var(--bg-1);}
.bhq-panel{background:var(--surface);border:1px solid var(--hairline);border-radius:var(--radius-md);box-shadow:none;padding:20px 24px;}
.bhq-panel-title{font-size:16px;font-weight:600;}
.bhq-panel-meta{font-size:13px;color:var(--text-dim);}
.bhq-note{color:var(--text-dim);}

/* App bar */
.bhq-topbar{flex-wrap:wrap;gap:8px 28px;padding:0 0 0;margin:-8px 0 24px;border-bottom:1px solid var(--hairline-strong);justify-content:flex-start;}
.bhq-logo-wrap{padding:10px 0;}
.bhq-h1{font-size:15px;font-weight:600;color:var(--text-dim);}
.bhq-nav{display:flex;flex-wrap:wrap;gap:2px;flex:1 1 auto;}
.bhq-nav-btn{background:none;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;padding:18px 10px 16px;font:inherit;font-size:14px;font-weight:500;color:var(--text-dim);cursor:pointer;transition:color 140ms var(--ease-out),border-color 140ms var(--ease-out);}
.bhq-nav-btn:hover{color:var(--text);}
.bhq-nav-btn[aria-current="page"]{color:var(--text);font-weight:600;border-bottom-color:var(--teal);}
.bhq-nav-btn:focus-visible,.bhq-link-btn:focus-visible{outline:2px solid var(--teal);outline-offset:2px;border-radius:4px;}
.bhq-link-btn{background:none;border:0;padding:0;font:inherit;font-size:13px;font-weight:500;color:var(--teal-bright);cursor:pointer;}
.bhq-link-btn:hover{text-decoration:underline;}
.bhq-topbar .bhq-whatsnew-btn{color:var(--text-dim);margin-left:auto;}
.bhq-topbar .bhq-whatsnew-btn:hover{color:var(--text);}
.bhq-whatsnew-dot{top:-4px;right:-10px;border-color:var(--bg-1);}
@media (max-width:720px){ .bhq-nav{order:3;flex-basis:100%;} .bhq-nav-btn{padding:10px 8px;} }

/* Page header */
.bhq-page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 24px;margin:0 0 20px;}
.bhq-page-head-main{display:flex;flex-direction:column;gap:6px;min-width:0;}
.bhq-page-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;}
.bhq-page-title{margin:0;font-size:28px;font-weight:600;letter-spacing:-0.01em;line-height:1.2;}
.bhq-page-title-row .bhq-cycle-note{flex-basis:100%;font-size:13px;color:var(--text-dim);}
.bhq-status{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap;cursor:default;}
.bhq-status::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;}
.bhq-status--complete{color:var(--green);background:color-mix(in srgb, var(--green) 12%, transparent);}
.bhq-status--pending{color:var(--teal-bright);background:var(--teal-glow-soft);}
.bhq-status--cancelled{color:var(--text-dim);background:color-mix(in srgb, var(--slate) 14%, transparent);}
.bhq-status:focus-visible{outline:2px solid var(--teal);outline-offset:2px;}
.bhq-cycle{margin:0;gap:10px;}
.bhq-cycle-label{font-size:13px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--text-dim);}
.bhq-cycle-picker{height:40px;padding:0 12px;font-size:14px;font-weight:500;background:var(--surface);border:1px solid var(--hairline-strong);border-radius:var(--radius-sm);}
.bhq-cycle .bhq-ghost{height:40px;padding:0 16px;font-size:14px;}

/* Upload freshness: one line under the title. The no-file case keeps amber. */
.bhq-freshness{display:block;margin:0;padding:0;border:0;background:none;font-size:13px;color:var(--text-dim);line-height:1.5;}
.bhq-freshness [data-tip]{cursor:default;}
.bhq-freshness-file{text-decoration:underline dotted;text-underline-offset:3px;}
.bhq-freshness [tabindex]:focus-visible{outline:2px solid var(--teal);outline-offset:2px;border-radius:2px;}
.bhq-freshness--missing{padding:8px 12px;border:1px solid color-mix(in srgb, var(--amber) 40%, transparent);border-radius:var(--radius-sm);background:color-mix(in srgb, var(--amber) 8%, transparent);color:var(--text);max-width:820px;}
.bhq-freshness--missing strong{color:var(--amber);font-weight:600;}

/* Fee lock deadlines: one neutral strip, a tag with the time left. */
.bhq-lock-countdown{display:flex;flex-wrap:wrap;margin:0 0 20px;padding:0;border:1px solid var(--hairline);border-radius:var(--radius-md);background:var(--surface);}
.bhq-lock-tile{flex:1 1 360px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px;border:0;border-radius:0;background:none;}
.bhq-lock-tile + .bhq-lock-tile{border-left:1px solid var(--hairline);}
@media (max-width:800px){ .bhq-lock-tile + .bhq-lock-tile{border-left:0;border-top:1px solid var(--hairline);} }
.bhq-lock-tile.is-warn,.bhq-lock-tile.is-hot,.bhq-lock-tile.is-locked{background:none;border-color:var(--hairline);}
.bhq-lock-tile-main{display:flex;align-items:center;gap:12px;min-width:0;}
.bhq-lock-tile-main .bhq-svc{width:26px;height:26px;border-radius:6px;font-size:12px;}
.bhq-lock-tile-name{font-size:14px;font-weight:600;color:var(--text);}
.bhq-lock-tile-when{font-size:13px;color:var(--text-dim);}
.bhq-lock-tag{flex:0 0 auto;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap;color:var(--text-dim);background:color-mix(in srgb, var(--slate) 14%, transparent);}
.bhq-lock-tile.is-warn .bhq-lock-tag{color:var(--amber);background:color-mix(in srgb, var(--amber) 12%, transparent);}
.bhq-lock-tile.is-hot .bhq-lock-tag{color:var(--red);background:color-mix(in srgb, var(--red) 12%, transparent);}

/* Line-of-business tabs: an underlined tab bar, not pills. */
.bhq-tabs-row{align-items:center;margin:0 0 20px;border-bottom:1px solid var(--hairline-strong);}
.bhq-tabs-row .bhq-tabs{gap:2px;}
.bhq-tab{background:none;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;border:0;border-bottom:2px solid transparent;border-radius:0;margin-bottom:-1px;padding:12px 14px;font-size:14px;font-weight:500;color:var(--text-dim);}
.bhq-tab:hover{background:none;color:var(--text);border-color:transparent;border-bottom-color:var(--hairline-strong);}
.bhq-tab.is-active{background:none;box-shadow:none;color:var(--text);font-weight:600;border-color:transparent;border-bottom-color:var(--tab-accent);}
.bhq-tab:focus-visible{outline:2px solid var(--teal);outline-offset:-2px;}
.bhq-switch{font-size:14px;font-weight:500;}

/* Figure tiles */
.bhq-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin-bottom:16px;}
.bhq-kpi{display:flex;flex-direction:column;gap:4px;padding:18px 20px;background:var(--surface);border:1px solid var(--hairline);border-radius:var(--radius-md);min-width:0;}
.bhq-kpi-label{font-size:13px;font-weight:500;color:var(--text-dim);}
.bhq-kpi-value{font-size:22px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-0.01em;}
.bhq-kpi--lead .bhq-kpi-value{font-size:28px;}
.bhq-kpi-sub{font-size:13px;color:var(--text-dim);font-variant-numeric:tabular-nums;min-height:1.4em;}

/* The mix card: three columns of thin split bars. */
.bhq-mix{flex-direction:row;flex-wrap:wrap;gap:0;padding:0;}
.bhq-mix-col{flex:1 1 300px;min-width:0;padding:18px 24px;display:flex;flex-direction:column;gap:12px;}
.bhq-mix-col + .bhq-mix-col{border-left:1px solid var(--hairline);}
@media (max-width:980px){ .bhq-mix-col + .bhq-mix-col{border-left:0;border-top:1px solid var(--hairline);} }
.bhq-mix-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;}
.bhq-mix-title{margin:0;font-size:14px;font-weight:600;}
.bhq-mix-bar{display:flex;gap:2px;height:10px;border-radius:3px;overflow:hidden;background:var(--hairline);}
.bhq-mix-seg--0{background:var(--accent);}
.bhq-mix-seg--1{background:color-mix(in srgb, var(--accent) 50%, var(--surface));}
.bhq-mix-seg--2{background:color-mix(in srgb, var(--accent) 60%, var(--text));}
.bhq-mix-seg--3{background:color-mix(in srgb, var(--accent) 22%, var(--surface));}
.bhq-mix-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;font-size:13px;}
.bhq-mix-list li{display:flex;justify-content:space-between;align-items:center;gap:12px;}
.bhq-mix-name{display:flex;align-items:center;gap:8px;min-width:0;}
.bhq-mix-name .bhq-agency-link{font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.bhq-mix-key{flex:0 0 auto;width:8px;height:8px;border-radius:2px;}
.bhq-mix-fig{font-variant-numeric:tabular-nums;color:var(--text);white-space:nowrap;}
.bhq-mix-pct{display:inline-block;min-width:3.6em;text-align:right;color:var(--text-dim);}

/* Buttons and tags, sentence case */
.bhq-ghost{border-radius:var(--radius-sm);padding:7px 14px;font-size:13px;font-weight:500;color:var(--text);background:var(--surface);}
.bhq-pill{text-transform:none;letter-spacing:0;font-size:12px;font-weight:600;padding:2px 9px;}
.bhq-pill--route{background:none;color:var(--text-dim);font-weight:400;padding:0;}
.bhq-pill--route-stripe{color:var(--teal-bright);font-weight:500;}
.bhq-field label{font-size:13px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--text-dim);}
.bhq-stat-label{font-size:13px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--text-dim);}
.bhq-stat-mini-label{font-size:12px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--text-dim);}
.bhq-stat-card{background:var(--surface);border-top-width:1px;border-color:var(--hairline);}

/* Filter bar */
.bhq-filter-bar{justify-content:flex-start;gap:12px;}
.bhq-search{flex:1 1 280px;display:flex;align-items:center;gap:8px;height:38px;padding:0 12px;border:1px solid var(--hairline-strong);border-radius:var(--radius-sm);background:var(--surface);color:var(--text-dim);}
.bhq-search:focus-within{border-color:var(--teal);box-shadow:0 0 0 3px var(--teal-glow-soft);}
.bhq-search input{flex:1;min-width:0;border:0;outline:none;background:transparent;font:inherit;font-size:14px;color:var(--text);}
.bhq-seg-toggle{border:0;border-radius:var(--radius-sm);padding:3px;background:color-mix(in srgb, var(--slate) 12%, transparent);}
.bhq-seg-btn,.bhq-pay-btn{border:0;border-radius:6px;padding:6px 12px;font-size:13px;font-weight:500;color:var(--text-dim);background:transparent;}
.bhq-seg-btn:hover,.bhq-pay-btn:hover{color:var(--text);border-color:transparent;}
.bhq-seg-btn.is-active,.bhq-pay-btn.is-active{background:var(--surface);color:var(--text);font-weight:600;box-shadow:0 1px 2px color-mix(in srgb, var(--text) 14%, transparent);}
.bhq-seg-count{margin-left:4px;font-weight:500;color:var(--text-dim);font-variant-numeric:tabular-nums;}

/* Tables: sentence-case headers, calmer figures, quiet controls. Shared by
   the ledger, the Change Log and Admin, so they all move together. */
thead th,.bhq-sort{font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--text-dim);}
.bhq-sort.is-active{color:var(--text);}
.bhq-sort.is-active .bhq-sort-caret{color:var(--teal);}
.bhq-sort:not(.is-active) .bhq-sort-caret{opacity:0;transition:opacity 120ms var(--ease-out);}
th:hover .bhq-sort:not(.is-active) .bhq-sort-caret,.bhq-sort:focus-visible .bhq-sort-caret{opacity:.6;}
.bhq-ledger thead th{background:color-mix(in srgb, var(--slate) 6%, var(--surface));}
tbody td{font-size:14px;}
td.fee{font-size:14px;font-weight:500;}
td.fee--media{font-weight:500;color:var(--text);}
td.fee--revenue{font-size:14px;font-weight:600;}
td.fee.is-zero{color:var(--text-faint);font-weight:400;}
.bhq-cell-channel{color:var(--text-dim);}
.bhq-adv-name{font-weight:500;}
/* CSM and Sales read as names until hovered or focused; still a select. */
.bhq-assign-select{appearance:none;-webkit-appearance:none;border-color:transparent;background-color:transparent;padding:5px 22px 5px 8px;margin-left:-8px;font-size:14px;cursor:pointer;
  background-image:linear-gradient(45deg, transparent 50%, currentColor 50%),linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:calc(100% - 12px) 52%,calc(100% - 8px) 52%;background-size:4px 4px,4px 4px;background-repeat:no-repeat;}
@media (hover:hover){
  .bhq-assign-select{background-size:0 0,0 0;}
  .bhq-assign-select:hover,.bhq-assign-select:focus{background-size:4px 4px,4px 4px;}
}
.bhq-assign-select:hover{border-color:var(--hairline-strong);background-color:var(--surface);}
.bhq-assign-select:focus-visible{outline:2px solid var(--teal);outline-offset:1px;border-color:var(--hairline-strong);background-color:var(--surface);}
.bhq-count-btn.has-open{background:var(--teal-glow-soft);border-color:transparent;color:var(--teal-bright);}
.bhq-drill{border-color:transparent;background:transparent;}
.bhq-drill:hover{border-color:var(--hairline-strong);}
.bhq-total-row td{border-top:1px solid var(--hairline-strong);background:color-mix(in srgb, var(--slate) 7%, var(--surface));box-shadow:0 -6px 16px color-mix(in srgb, var(--text) 8%, transparent);}
.bhq-total-label{font-size:14px;font-weight:600;letter-spacing:0;text-transform:none;}
.bhq-total-sub{font-size:13px;}
.bhq-total-fee{font-size:14px;font-weight:600;}
.bhq-total-revenue{font-size:15px;font-weight:700;}
/* Inside the last three days the lock tag ticks to the second and reads a
   little louder: larger tabular figures and a faint tint on the tile. */
.bhq-lock-tile.is-soon{background:color-mix(in srgb, var(--slate) 5%, transparent);}
.bhq-lock-tile.is-soon.is-warn{background:color-mix(in srgb, var(--amber) 6%, transparent);}
.bhq-lock-tile.is-soon.is-hot{background:color-mix(in srgb, var(--red) 7%, transparent);}
.bhq-lock-tile.is-soon .bhq-lock-tag{padding:6px 12px;font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--text);}
.bhq-lock-tile.is-soon.is-warn .bhq-lock-tag{color:var(--amber);}
.bhq-lock-tile.is-soon.is-hot .bhq-lock-tag{color:var(--red);}
.bhq-lock-countdown{overflow:hidden;}
@media (max-width:560px){ .bhq-lock-tile{flex-wrap:wrap;gap:10px;} .bhq-lock-tile .bhq-lock-tag{margin-left:38px;} }
