body.workspace-upgraded .workspace > .filter-bar,
body.workspace-upgraded #filter-summary,
body.workspace-upgraded #products-panel > .section-filters,
body.workspace-upgraded #refresh-product-visibility,
body.workspace-upgraded #impression-refresh,
body.workspace-upgraded #movers-toolbar,
body.workspace-upgraded .impression-controls > label:has(#impression-from),
body.workspace-upgraded .impression-controls > label:has(#impression-to),
body.workspace-upgraded .impression-controls > label:has(#impression-location),
body.workspace-upgraded .impression-controls > label:has(#impression-group),
body.workspace-upgraded #impression-terms,
body.workspace-upgraded .impression-period-picker { display: none !important; }
#workspace-filterbar { margin: 0 24px 12px; padding: 8px 12px 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 3px 10px #14203304; }
.ws-global-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ws-global-title { font-size: 12px; color: var(--blue-700); }
.ws-fixed-scope { display: none; }
.ws-refresh-area { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-left: auto; }
.ws-cache-status { max-width: 400px; color: var(--ink-500); font-size: 10px; line-height: 1.3; }
.ws-global-fields { display: grid; grid-template-columns: 148px minmax(190px,1.15fr) minmax(190px,1.1fr) minmax(145px,.8fr) minmax(175px,.9fr); gap: 7px; align-items:end; }
.ws-field { display: grid; align-content: start; gap: 3px; min-width: 0; }
.ws-field-label { display: block; color: var(--ink-500); font-size: 10px; line-height: 1.5; font-weight: 700; letter-spacing: .04em; }
.ws-date-field .wc-trigger { min-height: 30px; }
.ws-field .wc-trigger { font-size: 11px; }
.ws-group-line { display: flex; align-items: center; gap: 6px; }
.ws-group-select { flex: 1; min-width: 0; max-width: 100%; min-height: 25px; padding: 2px 4px; border: 0; background: transparent; color: var(--ink-500); font-size: 10px; }
.ws-global-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; padding-top: 5px; border-top: 1px solid var(--line-soft); }
.ws-global-extra > .text-filter { flex: 1; min-width: 180px; max-width: 280px; }
.ws-global-extra > .text-filter summary { min-height: 36px; }
.ws-global-extra > .ws-field { max-width: 230px; }
.ws-scope-mode { display: grid; gap: 3px; }
.ws-scope-mode .term-mode-switch { align-self: stretch; }
.ws-scope-mode .term-mode-switch button { min-height: 26px; flex:1; }
.ws-global-bottom { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 5px; }
.ws-filter-chips { display: flex; flex: 1 1 320px; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; }
.ws-filter-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 270px; padding: 3px 7px; border: 1px solid #d6e4f4; border-radius: 5px; color: var(--blue-700); background: #f2f7fd; font-size: 10px; }
.ws-filter-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-chip-remove { flex: 0 0 auto; width: 18px; height: 18px; padding: 0; border: 0; color: var(--blue-700); background: transparent; font-size: 15px; }
.ws-saved-area { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left:auto; }
.ws-saved-select { max-width: 240px; min-height: 30px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-700); background: #fff; font-size: 11px; }
.ws-button { min-height: 29px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--blue-700); background: #fff; font: inherit; font-size: 10px; white-space: nowrap; }
.ws-button:hover { background: var(--blue-100); }
.ws-button:disabled, .ws-link-button:disabled { opacity: .45; cursor: default; }
.ws-refresh { border-color: var(--blue-700); background: var(--blue-700); color: #fff; }
.ws-refresh:hover { background: var(--blue-600); }
.ws-link-button { padding: 4px 3px; border: 0; color: var(--blue-700); background: transparent; font-size: 10px; white-space: nowrap; }
.ws-select { min-height: 32px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink-700); font-size: 11px; }
.ws-chart-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-left: auto; }
body.workspace-upgraded .chart-header { flex-wrap: wrap; gap: 12px; }
body.workspace-upgraded .impression-controls:not(.impression-model-controls)::before { content: "Chart settings"; color: var(--ink-500); font-size: 10px; font-weight: 700; }
#workspace-insights { padding: 12px 17px; border-bottom: 1px solid var(--line-soft); background: #fbfcfe; }
.ws-insight-help { margin-left: 10px; font-size: 10px; color: var(--ink-500); }
#workspace-insights > .ws-field-label { display: inline; }
.ws-insight-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ws-insight-button { padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink-700); font-size: 11px; }
.ws-insight-button[aria-pressed="true"] { border-color: var(--blue-700); background: var(--blue-100); color: var(--blue-700); }
.ws-insight-explanation { margin: 8px 0 0; color: var(--ink-500); font-size: 11px; }
.ws-name-dialog { width: 430px; max-width: calc(100vw - 32px); padding: 22px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-900); background: #fff; box-shadow: var(--shadow); }
.ws-name-dialog::backdrop { background: #07142666; }
.ws-name-dialog h2 { margin: 0 0 15px; font-size: 17px; }
.ws-name-dialog input { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-900); font: inherit; font-size: 13px; }
.ws-dialog-note { color: var(--ink-500); font-size: 12px; line-height: 1.6; }
.ws-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.ws-error { color: #a6362b; font-size: 12px; }
#workspace-executive-pins { display: grid; gap: 18px; }
.ws-pin-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ws-pin-heading, .ws-pin-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.ws-pin-heading h3 { margin: 5px 0 0; font-size: 16px; }
.ws-pin-context, .ws-pins-empty { color: var(--ink-500); font-size: 11px; line-height: 1.7; }
.ws-pins-empty { padding: 16px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; font-size: 13px; }
.ws-pin-table { overflow: auto; max-height: 430px; margin-top: 14px; }
.ws-pin-table table { width: 100%; border-collapse: collapse; font-size: 11px; }
.ws-pin-table th { position: sticky; top: 0; padding: 9px; text-align: left; color: var(--ink-500); background: var(--surface-subtle); white-space: nowrap; }
.ws-pin-table td { padding: 9px; border-bottom: 1px solid var(--line-soft); min-width: 100px; max-width: 320px; overflow-wrap: anywhere; }
.ws-pin-table td:first-child { min-width: 170px; }
.ws-button:focus-visible, .ws-link-button:focus-visible, .ws-insight-button:focus-visible, .ws-select:focus-visible, .ws-saved-select:focus-visible, .ws-group-select:focus-visible, .ws-chip-remove:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }
@media (max-width: 1250px) { .ws-global-fields { grid-template-columns: repeat(2,minmax(180px,1fr)); } .ws-refresh-area { margin-left: 0; } }
@media (max-width: 700px) { #workspace-filterbar { margin-left: 12px; margin-right: 12px; padding: 12px; } .ws-global-fields { grid-template-columns: minmax(0,1fr); } .ws-global-extra > .text-filter { max-width: none; } .ws-cache-status { font-size: 10px; } .ws-saved-select { max-width: 190px; } .ws-chart-actions { justify-content: flex-start; margin-left: 0; } .ws-pin-heading { align-items: start; flex-direction: column; } }

/* Keep common choices visible and secondary settings compact. */
.ws-advanced { margin-top: 4px; font-size: 11px; }
.ws-advanced summary, .analysis-settings summary { cursor: pointer; color: #174878; font-weight: 600; }
.ws-advanced > div, .analysis-settings-body { display: flex; flex-wrap: wrap; align-items:center; gap: 8px; padding: 5px 0 1px; }
body.workspace-upgraded .ws-field-label, body.workspace-upgraded .chart-kicker,
body.workspace-upgraded .leaderboard-column-label, body.workspace-upgraded .leaderboard-summary span { text-transform: none; letter-spacing: .02em; font-size: 12px; }
body.workspace-upgraded .product-meta, body.workspace-upgraded .ws-fixed-scope,
body.workspace-upgraded .ws-cache-status, body.workspace-upgraded .analysis-muted { font-size: 12px; color: #465d79; }
body.workspace-upgraded .text-filter.is-filtered .text-filter-value { color: #102b4a; font-size: 14px; font-weight: 700; }
body.workspace-upgraded .ws-global-extra .text-filter { min-width: 235px; }
body.workspace-upgraded .leaderboard-row { font-size: 13px; }
body.workspace-upgraded .analysis-settings { margin-left: auto; font-size: 13px; }
body.workspace-upgraded #workspace-chart-context { font-size: 12px; line-height: 1.6; }
body.workspace-upgraded .live-chart-card[data-product-table="term-visibility"] .leaderboard-header,
body.workspace-upgraded .live-chart-card[data-product-table="term-visibility"] .leaderboard-row,
body.workspace-upgraded .live-chart-card[data-product-table="term-saturation"] .leaderboard-header,
body.workspace-upgraded .live-chart-card[data-product-table="term-saturation"] .leaderboard-row { grid-template-columns: minmax(240px, 2fr) minmax(155px, 1.2fr) repeat(4,minmax(120px,1fr)) repeat(2,minmax(80px,.6fr)); }

body.workspace-upgraded .leaderboard-header, body.workspace-upgraded .live-metric-grid span,
body.workspace-upgraded .impression-summary span { text-transform: none; letter-spacing: .02em; font-size: 12px; color: #465d79; }
body.workspace-upgraded .ws-global-heading { margin-bottom: 10px; }
body.workspace-upgraded .wc-trigger { min-height:30px; padding:5px 8px; border-radius:6px; }
body.workspace-upgraded .ws-global-heading { margin-bottom:6px; }
body.workspace-upgraded #visibility-page-description,
body.workspace-upgraded #product-visibility-card > .chart-header > div:first-child,
body.workspace-upgraded #product-visibility-state,
body.workspace-upgraded .workspace-chart-filters,
body.workspace-upgraded #workspace-chart-context,
body.workspace-upgraded #sampling-note,
body.workspace-upgraded #product-visibility-card > footer { display:none !important; }
body.workspace-upgraded #product-visibility-card > .chart-header { padding:7px 10px; }
body.workspace-upgraded #product-visibility-card > .chart-header .chart-header-actions { width:100%; justify-content:space-between; }
body.workspace-upgraded #products-panel > .page-heading { margin-bottom:7px; }
body.workspace-upgraded .workspace-chart-filters:has(.cf-status.cf-custom) { display:block !important; }

/* Readability and hierarchy pass. */
body.workspace-upgraded { --ink-500: #52647a; }
body.workspace-upgraded .topbar { min-height:50px; height:auto; gap:14px; }
body.workspace-upgraded .topbar-actions { min-width:0; flex-wrap:nowrap; justify-content:flex-end; }
body.workspace-upgraded .local-pill { min-width:0; max-width:210px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

body.workspace-upgraded #workspace-filterbar { padding:6px 10px 5px; }
body.workspace-upgraded .ws-global-fields { gap:6px; }
body.workspace-upgraded .ws-global-extra { gap:6px; margin-top:3px; padding-top:4px; }
body.workspace-upgraded .ws-global-bottom { gap:6px; margin-top:3px; }
body.workspace-upgraded .ws-advanced > div { padding-top:4px; }

body.workspace-upgraded .ws-field-label,
body.workspace-upgraded .ws-field .wc-trigger,
body.workspace-upgraded .ws-group-select,
body.workspace-upgraded .ws-saved-select,
body.workspace-upgraded .ws-button,
body.workspace-upgraded .ws-link-button,
body.workspace-upgraded .ws-filter-chip,
body.workspace-upgraded .term-mode-switch button,
body.workspace-upgraded .leaderboard-product strong,
body.workspace-upgraded .leaderboard-product div > span,
body.workspace-upgraded .leaderboard-row > strong,
body.workspace-upgraded .product-details-toggle,
body.workspace-upgraded .position-bin,
body.workspace-upgraded .position-missing-note,
body.workspace-upgraded .chart-card footer,
body.workspace-upgraded .readiness-banner div span,
body.workspace-upgraded .readiness-state,
body.workspace-upgraded .priority-badge,
body.workspace-upgraded .queued-badge { font-size:12px; }

body.workspace-upgraded .ws-saved-area { color:#52647a; }
body.workspace-upgraded .ws-saved-area .ws-button:not(.ws-refresh),
body.workspace-upgraded .ws-link-button { border-color:transparent; background:transparent; color:#365b83; font-weight:600; }
body.workspace-upgraded .ws-chart-actions .ws-button:not(.ws-refresh) { border-color:#d7e1ec; background:#f8fafc; color:#435b75; }
body.workspace-upgraded .ws-button:disabled,
body.workspace-upgraded .ws-link-button:disabled { opacity:.62; color:#66778a; }

body.workspace-upgraded .live-chart-card[data-product-table="distribution"] .leaderboard {
  max-height:max(260px, calc(100vh - 460px));
  min-height:260px;
  overflow:auto;
  scrollbar-gutter:stable;
  box-shadow:inset -12px 0 12px -14px #14203380;
}
body.workspace-upgraded .live-chart-card[data-product-table="distribution"] .leaderboard-header { position:sticky; top:0; z-index:8; }
body.workspace-upgraded .leaderboard { scrollbar-color:#8ca3bb #edf2f7; scrollbar-width:auto; }
body.workspace-upgraded .leaderboard::-webkit-scrollbar { width:11px; height:11px; }
body.workspace-upgraded .leaderboard::-webkit-scrollbar-track { background:#edf2f7; }
body.workspace-upgraded .leaderboard::-webkit-scrollbar-thumb { border:2px solid #edf2f7; border-radius:8px; background:#8ca3bb; }

@media (max-width: 1180px) {
  body.workspace-upgraded .topbar { padding-left:18px; padding-right:18px; }
  body.workspace-upgraded .topbar-actions { gap:6px; }
  body.workspace-upgraded .local-pill { max-width:155px; }
}

/* One-row filter bar placed under each page title (Sept 23): labels inside the controls, × clears a
   filled control, "More" opens groups/saved views/Clear all below the row. The top bar is gone. */
/* Only the "Version 2" badge remains of the top bar, floating top right without taking a row. */
body.workspace-upgraded .workspace { position:relative; }
body.workspace-upgraded .topbar { position:absolute; top:8px; right:24px; z-index:5; height:auto; min-height:0; padding:0; border:0 !important; background:transparent !important; backdrop-filter:none; }
body.workspace-upgraded .topbar > div:first-child, body.workspace-upgraded .topbar .icon-button, body.workspace-upgraded .topbar .user-button, body.workspace-upgraded .topbar .local-pill { display:none !important; }
body.workspace-upgraded .page-heading, body.workspace-upgraded .ai-top { padding-right:84px; }
body.workspace-upgraded #workspace-filterbar, body:not([data-section="overview"]) #workspace-filterbar { margin:0 0 12px; padding:6px 8px 4px; }
body.workspace-upgraded .chart-card > #workspace-filterbar { margin:0 16px 10px; }
body.workspace-upgraded .page-heading:has(+ #workspace-filterbar) { margin-bottom:8px; }
body.workspace-upgraded #actionable-head .ai-nav { margin-bottom:10px; }
body.workspace-upgraded #actionable-head .ai-top { margin-bottom:8px; }
body.workspace-upgraded .ws-global-fields { display:flex; flex-wrap:nowrap; align-items:center; gap:6px; }
.ws-mode-field, .ws-more, #workspace-filterbar .ws-refresh { flex:0 0 auto; }
.ws-inline-field { position:relative; flex:1 1 0; min-width:0; }
.ws-products-field { flex-grow:1.5; } .ws-terms-field { flex-grow:1.2; } .ws-locations-field { flex-grow:.9; }
.ws-date-field.ws-inline-field { flex:0 1 auto; min-width:175px; }
.ws-inline-field .wc-trigger-copy { display:block; white-space:nowrap; }
.ws-inline-field.has-value .wc-trigger { padding-right:26px; }
.ws-clear { position:absolute; right:5px; top:50%; transform:translateY(-50%); width:18px; height:18px; padding:0; border:0; border-radius:50%; background:transparent; color:#52647a; font-size:15px; line-height:18px; cursor:pointer; }
.ws-clear:hover { background:#e6edf5; color:#102b4a; }
.ws-clear[hidden], .ws-advanced[hidden], .ws-clear-all[hidden] { display:none !important; }
#workspace-filterbar .ws-clear-all { flex:0 0 auto; font-size:12px; padding:6px 8px; text-decoration:underline; }
body.workspace-upgraded #workspace-filterbar .ws-cache-status { max-width:none; margin-top:2px; text-align:right; font-size:11px; line-height:1.3; color:#6b7c90; }
body.workspace-upgraded #workspace-filterbar .ws-advanced { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; margin-top:6px; padding:6px 0 2px; border-top:1px solid var(--line-soft); }
body.workspace-upgraded #workspace-filterbar .ws-group-line { flex:0 1 auto; }
body.workspace-upgraded #workspace-filterbar .ws-group-select { min-width:150px; }
@media (max-width: 1100px) { body.workspace-upgraded .ws-global-fields { flex-wrap:wrap; } .ws-inline-field { flex:1 1 40%; } }
.ws-inline-field > div, .ws-inline-field .wc-control, .ws-inline-field .wc-trigger { min-width:0; max-width:100%; }
body.workspace-upgraded .ws-inline-field { display:block; }
body.workspace-upgraded .ws-date-field.ws-inline-field { flex:0 0 auto; }
body.workspace-upgraded #impression-share-panel { padding-top:34px; }

/* Shared table pager (pager.js), right-aligned under each table. */
.pager { display:flex; align-items:center; justify-content:flex-end; gap:18px; margin-left:auto; padding:8px 4px; color:#52647a; font-size:12px; }
.pager label { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.pager select { min-height:26px; padding:2px 6px; border:1px solid #d7e1ec; border-radius:5px; background:#fff; color:#243b55; font:inherit; }
.pager-range { white-space:nowrap; font-variant-numeric:tabular-nums; }
.pager-nav { display:inline-flex; gap:3px; }
.pager-btn { min-width:28px; height:26px; padding:0 6px; border:1px solid #d7e1ec !important; border-radius:5px; background:#fff !important; color:#245b9a !important; font:inherit; cursor:pointer; }
.pager-btn:hover:not(:disabled) { background:#eef4fb !important; }
.pager-btn:disabled { opacity:.4; cursor:default; }
.pricing-pagination > .pager { flex:1; padding:0; }
#product-visibility-chart > .pager { position:sticky; left:0; bottom:0; background:#fff; border-top:1px solid #e8edf4; }
/* "Version 2" stays in its spot but only shows on hover. */
body.workspace-upgraded .version-switch { opacity:0; transition:opacity .15s; }
body.workspace-upgraded .version-switch:hover { opacity:1; }
/* Products chart Options menu (replaces "More chart settings"). */
body.workspace-upgraded .analysis-options { position:relative; margin-left:auto; }
body.workspace-upgraded .analysis-options > summary { list-style:none; font-size:13px; font-weight:600; color:#245b9a; padding:4px 2px; }
body.workspace-upgraded .analysis-options > summary::-webkit-details-marker { display:none; }
body.workspace-upgraded .analysis-options > .analysis-settings-body { position:absolute; right:0; top:calc(100% + 4px); z-index:30; display:flex; flex-direction:column; align-items:flex-start; gap:10px; min-width:250px; padding:14px 16px; border:1px solid #ccdbee; border-radius:8px; background:#fff; box-shadow:0 8px 30px #15396122; }
/* Visibility Movers quick filters, left of Export. */
#workspace-chart-settings[hidden] { display:none !important; }
.mover-quick { display:flex; gap:6px; margin-right:auto; }
body.workspace-upgraded .mover-quick-button { font-size:12px; font-weight:600; }
body.workspace-upgraded .mover-quick-button[aria-pressed="true"] { border-color:#1858a8 !important; background:#1858a8 !important; color:#fff !important; }
/* Product Visibility: a divider between the Visibility bar and the next column (Appearance Rate). */
body.workspace-upgraded .leaderboard-row > .visibility-bar-cell { padding-right:16px; }
body.workspace-upgraded .leaderboard-row > .visibility-bar-cell + *,
body.workspace-upgraded .leaderboard-header > [data-column="visibility_score"] + * { align-self:stretch; display:flex; align-items:center; border-left:1px solid #d3dde8; padding-left:16px; }

/* Trends is a single card: its title and subtitle match the other page titles (Sept 24 UX pass). */
body.workspace-upgraded #impression-share-title { font-size:23px; margin:0; letter-spacing:-.035em; }
body.workspace-upgraded .impression-subtitle { font-size:13px; margin-top:4px; }
#workspace-filterbar .ws-clear-all:disabled { text-decoration:none; }
body.workspace-upgraded :is(.ws-products-field,.ws-terms-field,.ws-locations-field).ws-inline-field { flex-grow:1; min-width:118px; }
body.workspace-upgraded .chart-card > #workspace-filterbar { margin:0 8px 10px; }
