/* ── Charts tab: one header row on desktop (user 2026-10-30, as Government / Congress / Reports / Markets: "tabs on the
   left, all the settings on the right, always one single row"; controls styled by kind). The row is rendered by
   financials/_charts.html (#ch-bar: the plan's lock word, Presets · Metrics · View settings,
   Download PNG, Save chart) so the first paint is already right; no script moves anything. Gated on html.aiq-desk
   (_phone.html, set before paint), never a media query: a workspace tab draws the page in an iframe narrower than 768px
   on a laptop. All charts · Builder are the tabs of the page's tab strip (.at-ft-bar, fin-tabbar-draft.css, the Dashboards look), not of this row. ── */
html.aiq-desk #tab-charts .ch-head:not(#_) { display: none !important; }
html:not(.aiq-desk) #ch-bar :is(.fcr-plan, .fcr-png, .fcr-save):not(#_):not(#_) { display: none !important; }
/* the row: 48px, never wraps; the Builder keeps it (its grid-only controls hide) so the tabs stay put */
html.aiq-desk #tab-charts #ch-bar:not(#_):not(#_):not(#_):not(#_) { display: flex !important; flex-wrap: nowrap; justify-content: flex-start;
  gap: 2px; height: 48px; margin-top: -8px !important; padding-left: 5px !important; container-type: inline-size; }
html.aiq-desk #tab-charts #ch-bar > .ct-group:not(#_):not(#_):not(#_):not(#_):not(#_) { flex-wrap: nowrap; gap: 2px; margin-left: 0 !important; flex: none; }
/* the partial's own pieces the row doesn't show: the old Builder | Grid switch (the tabs say it), period, the range
   slider, the count, separators, the old PNG button and the shared Download box (rowTwo's .at-r2; .fcr-png replaces
   it). View settings folds period and range into its menu (aiq-attio-draft.js chartsRow), where they show. */
html.aiq-desk #tab-charts #ch-bar > .ct-group > :is(#fin-charts-view, #period-toggle-bar, #year-scrubber-wrap, #cg-count, .ct-sep, .ch-png-src, .at-rangepill):not(#_):not(#_):not(#_) { display: none !important; }
html.aiq-desk #tab-charts #ch-bar .at-r2:not(#_):not(#_):not(#_) { display: none !important; }
html.aiq-desk #tab-charts #ch-disp .at-fold-view:not(#_):not(#_):not(#_):not(#_) { display: none !important; }
/* Download PNG on All charts, Save chart on the Builder (its old row, #fc-row, goes with its space) */
html.aiq-desk #fc-row:not(#_) { display: none; }
html.aiq-desk #tab-charts #ch-bar :is(.fcr-png, .fcr-save):not(#_):not(#_) { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; flex: none; white-space: nowrap; }
html.aiq-desk:not(.fin-builder) #tab-charts #ch-bar .fcr-save:not(#_):not(#_):not(#_) { display: none; }
html.aiq-desk.fin-builder #tab-charts #ch-bar .fcr-png:not(#_):not(#_):not(#_) { display: none; }
/* a saved chart opened from My charts (?from=charts): its Builder isn't Company › Charts, so no All charts · Builder tabs (they keep their space) */
html.aiq-desk.fin-from-my.fin-builder #ch-bar .fcr-tabs:not(#_):not(#_) { visibility: hidden; }
/* …and its row has nothing else left (user, 2026-11-01): the plan word + Save chart move up into the ticker row (.at-ft-co,
   main is the positioned box; the bar stays 48px, so top 0 centres it on the row) and the row's height goes. Save chart is the page's one create action there, so it's blue. */
html.aiq-desk.fin-from-my.fin-builder #tab-charts #ch-bar:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { position: absolute; top: 0; right: 12px; z-index: 2;
  width: auto; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; container-type: normal; }
html.aiq-desk.fin-from-my.fin-builder #ch-bar .fcr-tabs:not(#_):not(#_):not(#_) { display: none; }
/* the bar's bottom line stays (user, 2026-11-01: "there should still be a line"): drawn under the ticker row, edge to edge */
html.aiq-desk.fin-from-my.fin-builder:has(#tab-charts.active) main .at-ft:not(#_):not(#_) { margin-left: -12px; margin-right: -12px; margin-bottom: 16px;
  padding: 0 12px 6px; border-bottom: 1px solid var(--a-line); }
/* Save chart is blue (user asked blue), also under the Mint scheme, whose .at-pri is green */
html.aiq-desk #tab-charts #ch-bar .fcr-save.at-pri:not(#_):not(#_):not(#_):not(#_) { background: #455DDC !important; color: #FFFFFF !important; box-shadow: none !important; }
html.aiq-desk #tab-charts #ch-bar .fcr-save.at-pri:hover:not(#_):not(#_):not(#_):not(#_) { background: #3A50C4 !important; }
html.aiq-desk #tab-charts #ch-bar .fcr-save.at-pri > i:not(#_):not(#_) { color: inherit; }
/* in a workspace tab (iframe, html.is-popout) there's no rail beside the page: the -14px bleed overhung the 12px padding by 2px */
html.aiq-desk.is-popout #tab-charts #ch-bar:not(#_):not(#_):not(#_):not(#_):not(#_) { margin-right: -12px !important; }

/* No All charts · Builder tabs in this row (user, 2026-11-04): the sidebar's Company › Charts fold-out opens the two views
   (financials/index.html finOpenCharts; the hash #charts / #builder still works). The row starts with its first control;
   Download PNG keeps the far right. */
html.aiq-desk #tab-charts #ch-bar > .fcr-png:not(#_):not(#_):not(#_) { margin-left: auto; }

/* right side, styled by kind (user 2026-10-30): view settings (Presets · Metrics · View settings) are plain borderless
   words, dropdowns keep their ⌄, leading icons go; Download PNG / Save chart make something, so they're the outlined
   Attio .at-btn with their icon. Save chart is the Builder's create action: .at-pri blue (user, 2026-11-01). */
html.aiq-desk #tab-charts #ch-bar :is(.ct-btn, .fcr-plan):not(.period-mode-btn):not(.cg-cols-btn):not(#_):not(#_):not(#_):not(#_) {
  display: inline-flex; align-items: center; gap: 6px; height: 28px !important; padding: 0 9px !important; border: 0 !important; border-radius: 8px !important;
  box-shadow: none !important; background: transparent !important; color: var(--a-ink) !important; flex: none;
  font: 500 14px/20px Inter, system-ui, sans-serif !important; letter-spacing: -0.07px !important; white-space: nowrap; }
html.aiq-desk #tab-charts #ch-bar :is(.ct-btn, .fcr-plan):not(.period-mode-btn):not(.cg-cols-btn):hover:not(#_):not(#_):not(#_):not(#_) { background: var(--a-fill, rgba(0,0,0,.04)) !important; }
html.aiq-desk #tab-charts #ch-bar :is(.ct-btn:not(.cg-cols-btn) > svg, .ct-btn > .at-bic, #ch-disp > button > i:first-child):not(#_):not(#_) { display: none; }
html.aiq-desk #tab-charts #ch-bar :is(.fcr-png, .fcr-save) > i { font-size: 16px; color: var(--a-mute); }
/* the plan word: muted, its lock first (the information stays; the note's line goes) */
html.aiq-desk #tab-charts #ch-bar .fcr-plan:not(#_):not(#_):not(#_):not(#_) { color: var(--a-mute) !important; cursor: pointer; }
html.aiq-desk #tab-charts #ch-bar .fcr-plan:hover:not(#_):not(#_):not(#_):not(#_) { color: var(--a-ink) !important; }
.fcr-plan i { font-size: 14px; }

/* laptop widths: still one row, sized to the row (sidebar open or not) — words shorten, then become icons */
@container (max-width: 780px) {
  html.aiq-desk #tab-charts #ch-bar :is(.ct-btn, .fcr-plan):not(.period-mode-btn):not(.cg-cols-btn):not(#_):not(#_):not(#_):not(#_) { padding: 0 6px !important; }
  html.aiq-desk #tab-charts #ch-bar .fcr-png:not(#_):not(#_):not(#_) { width: 28px; padding: 0; gap: 0; justify-content: center; }
  html.aiq-desk #tab-charts #ch-bar .fcr-png > span:not(#_):not(#_) { display: none; }
}
@container (max-width: 560px) {
  html.aiq-desk #tab-charts #ch-bar .fcr-plan .fcr-l:not(#_) { display: none; }
  html.aiq-desk #tab-charts #ch-bar #ch-disp > button:not(#_):not(#_):not(#_):not(#_) { font-size: 0 !important; gap: 0; }
  html.aiq-desk #tab-charts #ch-bar #ch-disp > button > i:first-child:not(#_):not(#_):not(#_) { display: inline-block !important; font-size: 16px; color: var(--a-ink); }
  html.aiq-desk #tab-charts #ch-bar #ch-disp > button > .at-car:not(#_):not(#_) { display: none; }
}

/* Graphs look on the stock page's Builder too (user, 2026-11-04: "make this builder page exactly like graphs, edge to edge not cards"): every rule below keys on html.fin-builder, not only html.fin-from-my. */
/* Graphs (My charts › Graphs, html.fin-from-my): Koyfin's layout, edge to edge and square (user, 2026-11-04: "this page
   shouldn't be cards but edge to edge and not rounded like Koyfin"). No card boxes: the Selections panel runs down the
   left under the ticker row's line with a hairline on its right, the chart fills the rest. The stock page's Builder
   (Company › Charts) wears the same look (2026-11-04). */
html.aiq-desk.fin-builder #charts-focus .fv-row:not(#_):not(#_):not(#_) { gap: 0 !important; column-gap: 0 !important; margin: 0 -12px; border-bottom: 1px solid var(--a-line); }
/* the cards draw their hairline on ::after (the house card overlay): gone, or it doubled the ticker row's line and the
   row's bottom line into thick ones; one hairline each — top (.at-ft), bottom (the row), and panel | chart */
html.aiq-desk.fin-builder #charts-focus :is(.fv-panel, .fv-chart).card:not(#_):not(#_):not(#_) {
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; }
html.aiq-desk.fin-builder #charts-focus :is(.fv-panel, .fv-chart).card:not(#_):not(#_):not(#_)::after,
html.aiq-desk.fin-builder #charts-focus :is(.fv-panel, .fv-chart).card:not(#_):not(#_):not(#_)::before { display: none !important; }
html.aiq-desk.fin-builder #charts-focus .fv-row > .fv-panel.card:not(#_):not(#_):not(#_):not(#_) { border-right: 1px solid var(--a-line) !important; }

/* ══ Graphs premium-look DRAFT (user, 2026-11-04: "draft it all"): My charts › Graphs ?drafts=1 → html.aiq-desk.gr-d ══
   1 names + latest values under the title (financials-charts.js _grDraftHead) · 4 the toolbar as plain words · 6 the chart runs to the bottom, "Add chart" a text link. 2 + 5 live in _grDraftOpt. */
html.aiq-desk.gr-d .gr-lgd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 0 16px 6px; font: 400 12px/18px Inter, system-ui, sans-serif; color: var(--a-mute); }
html.aiq-desk.gr-d .gr-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
html.aiq-desk.gr-d .gr-chip > i { width: 3px; height: 12px; border-radius: 1px; flex: none; }
html.aiq-desk.gr-d .gr-chip b { color: var(--a-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
html.aiq-desk.gr-d .gr-when { margin-left: auto; font-variant-numeric: tabular-nums; }
/* 4 · toolbar: plain words like the page's view settings; PNG stays the one outlined action */
html.aiq-desk.gr-d #charts-focus .fv-tools :is(.ct-btn, .at-rangepill):not(.fv-dl):not(#_):not(#_) { border: 0 !important; background: none !important; box-shadow: none !important; color: var(--a-ink); padding: 0 6px; }
html.aiq-desk.gr-d #charts-focus .fv-tools :is(.ct-btn, .at-rangepill):not(.fv-dl):hover:not(#_):not(#_) { color: var(--a-ink); background: var(--a-fill) !important; border-radius: 4px; }
html.aiq-desk.gr-d #charts-focus .fv-tools .fv-dl:not(#_):not(#_) { border-radius: 4px !important; }
/* 6 · the chart runs to the bottom of the window ("Add chart" keeps the Builder's rounded dashed box: user, 2026-11-04, after trying a
   left text link: "the one before was better") */
html.aiq-desk.gr-d #charts-focus .fv-chart:not(#_):not(#_) { min-height: max(440px, calc(100vh - 150px)); }

/* Graphs saves by itself (user, 2026-11-04: "get rid of the save chart button, it should save automatically"): no Save chart button in the Builder */
html.aiq-desk.fin-builder #tab-charts #ch-bar .fcr-save:not(#_):not(#_):not(#_) { display: none !important; }
/* Graphs and the stock page's Builder: no company row (ticker, name, price) over the chart (the strip's tab bar, also in .at-ft, stays) (user, 2026-11-04: "get rid of this row"); the Tickers panel changes the company */
html.aiq-desk.fin-tbx.fin-builder:has(#tab-charts.active) main .at-ft .at-ft-co:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { display: none !important; }
/* ...and its plan word ("5 years") floated over the chart's own buttons with the row gone; the Builder on the stock page has no row either (user, 2026-11-04: "get rid of the 5 years from the builder view and move the cards up") */
html.aiq-desk.fin-builder:has(#tab-charts.active) #tab-charts #ch-bar:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) { display: none !important; }

/* Graphs' figures table, Attio style (user, 2026-11-04: "more Attio style, and the header shouldn't be grey"): no card box, no
   header band, sentence-case 12/500 grey headings on a hairline, 13/500 cells, tints only on hover; edge to edge */
html.aiq-desk.fin-builder .fv-table.card:not(#_):not(#_) { background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; border-top: var(--hair, 1px) solid var(--a-line) !important; margin: 0 -12px; }
html.aiq-desk.fin-builder .fv-table.card:not(#_):not(#_)::before, html.aiq-desk.fin-builder .fv-table.card:not(#_):not(#_)::after { display: none !important; }   /* the card's own outline overlay drew a second line under the last row */
html.aiq-desk.fin-builder .fv-table table:not(#_) { font-size: 13px; }
html.aiq-desk.fin-builder .fv-table th:not(#_):not(#_) { padding: 0 16px; height: 36px; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--a-3, #7a7d85) !important; background: transparent !important; border-bottom: var(--hair, 1px) solid var(--a-line) !important; }
html.aiq-desk.fin-builder .fv-table th.fv-th-metric:not(#_):not(#_) { background: var(--sh-bed, transparent) !important; }
html.aiq-desk.fin-builder .fv-table td:not(#_):not(#_) { padding: 0 16px; height: 40px; font-size: 13px; font-weight: 500; color: var(--a-ink) !important; border-bottom: var(--hair, 1px) solid var(--a-line) !important; }
html.aiq-desk.fin-builder .fv-table td.fv-td-metric:not(#_):not(#_) { font-weight: 500; background: var(--sh-bed, transparent) !important; color: var(--a-ink) !important; }
html.aiq-desk.fin-builder .fv-table tr:last-child td:not(#_):not(#_) { border-bottom: 0 !important; }
html.aiq-desk.fin-builder .fv-table tr:hover td:not(#_):not(#_) { background: var(--a-hover, rgba(128,128,128,.07)) !important; }
html.aiq-desk.fin-builder .fv-table tr:hover td.fv-td-metric:not(#_):not(#_) { background: var(--a-hover, rgba(128,128,128,.07)) !important; }
html.aiq-desk.fin-builder .fv-table td.is-empty:not(#_):not(#_) { color: var(--a-3, #9a9da5) !important; font-weight: 400; }
html.aiq-desk.fin-builder .fv-table td.is-neg:not(#_):not(#_) { color: var(--tb-neg, #c8203f) !important; }
html.aiq-desk.fin-builder .fv-table .fv-td-dot { width: 8px; height: 8px; margin-right: 10px; }

/* Graphs: the Tickers / Metrics panel stays on the left at any desktop width (user, 2026-11-04). The Builder's own
   900px media query stacked it under the chart; a workspace tab or a small window hit that. It narrows instead. */
html.aiq-desk.fin-builder #charts-focus .fv-row:not(#_):not(#_):not(#_) { grid-template-columns: clamp(170px, 26%, 248px) minmax(0, 1fr) !important; }
html.aiq-desk.fin-builder #charts-focus .fv-row > .fv-panel:not(#_):not(#_):not(#_) { order: -1 !important; min-width: 0; overflow: hidden; }

/* the line between the chart and the figures table, and the one under it: hairlines, clearly visible (user, 2026-11-04) */
html.aiq-desk.fin-builder #charts-focus .fv-row:not(#_):not(#_):not(#_):not(#_) { border-bottom: var(--hair, 1px) solid color-mix(in srgb, var(--a-ink, #101112) 16%, transparent); }
html.aiq-desk.fin-builder .fv-table.card:not(#_):not(#_):not(#_) { border-top: var(--hair, 1px) solid color-mix(in srgb, var(--a-ink, #101112) 16%, transparent) !important; }   /* the table sits INSIDE .fv-row: the row's bottom line is under the table, this is the one over it */

/* Graphs has no new-window button on a chart (user, 2026-11-04) */
html.aiq-desk.fin-builder .fv-pop:not(#_):not(#_) { display: none !important; }

/* ── Price vs earnings (Graphs templates, FastGraphs set-up, 2026-11-05; js/fin-fastgraph.js) ── */
.fv-tools select.fg-basis { appearance: none; -webkit-appearance: none; border: 0; background: transparent no-repeat right 2px center / 10px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2.5 4l2.5 2.5L7.5 4' fill='none' stroke='%23888' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  padding: 4px 16px 4px 6px; font: 500 12.5px/18px Inter, sans-serif; color: inherit; cursor: pointer; border-radius: 4px; }
.fv-tools select.fg-basis:hover { background-color: rgba(128,128,128,.12); }
.fv-tools select.fg-basis[hidden] { display: none; }
/* a Blank graph before its first metric (Graphs, 2026-11-05): a prompt in the chart space, never an empty frame */
.fv-blank { height: 100%; min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font: 500 13px/18px Inter, sans-serif; color: #727C94; }
.fv-blank i { font-size: 26px; color: #A0A9C0; }
