/* prism-tabs.css (2026-11-07): ONE look for every page's PRIMARY tab bar.
   User, 7 Nov: no blue underline tabs, no blue-text tabs. The approved look is the original Charts workspace tab
   (workspace.css @4ad4490, #page-charts .ws-tab): a 30px rounded tab, grey label; hover and selected get a soft
   neutral fill and the near-black text colour. No underline, no border, no blue, no rule under the row.
   Colours come from the shell tokens (body.sv-shell in spectra-home.css): light --muted #68686f, --hover #f4f4f5,
   --selected #efeff1, --text #0a0a0a; dark --muted #8e8e96, --hover #242424, --selected #2a2a2a, --text #fff.
   Monitors uses its own --vc-fill for both (mon-clean.css).
   Linked LAST in <head>. selection.css and consistency.css set these tabs with !important (transparent idle,
   ice-blue fill, blue text, blue inset underline), so this file must use !important too, with higher specificity.
   Second-level rows (Company Quarterly/Shareholding, Funds "Views" link tabs, filter chips, the Trading builder's
   block palette) are out of scope and keep their own look.
   Left alone: #page-charts .ws-tab (Charts owns it) and #company-detail .detail-tabs (company.css already has
   this look: soft fill, --text, no blue). */

/* The fill: on a white pane --selected (#efeff1) and --hover (#f4f4f5) are the soft grey of the Charts tabs, but several
   panes are warm (#F5EFEB: Monitors, Trading, Company) and there those near-white tokens read as a white chip, not a
   grey one; on Monitors --selected equals --hover. So the fill is the text colour at low strength over whatever the pane
   is: on white it lands on the same grey (#ededed / #f5f5f5), in dark on #2c2c2c / #252525 (tokens: #2a2a2a / #242424).
   Browsers without color-mix keep the token line before it. */
html body{--prism-tab-fill:color-mix(in srgb,var(--text) 7%,transparent);--prism-tab-hover:color-mix(in srgb,var(--text) 4%,transparent)}

/* ---- the rows: plain flex, no frame, no rule underneath ---- */
html body :is(
  main .pi-tabs,                                  /* theme pages: #power #agri #payments #transport #labour #weather #healthcare #flows #geo #policy #sectors #ipo */
  #page-ipo .ipo-tabs,                            /* #ipo/issue/<key> */
  #page-ipo .ipo-discovery-nav,
  main .ds-tabs,                                  /* #datasets #alternative #indices */
  #market-view #market-tabs,                      /* #market */
  #page-news .nx-tabs,                            /* #news */
  main .fi-switch,                                /* #funds #investors */
  main .own-switch,                               /* #owners #shareholders #groups */
  #page-thesis .pt-tabs,                          /* personal thesis: My thesis | Review history */
  #page-strategy-lab .sl-tabs,                    /* #strategy-lab/research (Trading > Research tools) */
  #page-monitors .mart-tabs,                      /* #monitors/<id>: Dashboard | Data */
  main .vc-tabs,
  .hub-tabs .hub-tabs-row,                        /* hub-tabs.js (every hub is bar:false today) */
  #page-investors-analysts .ia-view-group         /* #investors-analysts views */
){
  display:flex!important;align-items:center!important;gap:2px!important;
  border:0!important;border-bottom:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;
  padding-top:0!important;padding-bottom:0!important;
}
html body :is(#page-strategy-lab .sl-tabs){padding:0!important;align-self:flex-start}
html body #market-view #market-tabs{padding:12px 0!important}
html body #page-investors-analysts .ia-views{gap:8px 20px!important}

/* ---- each tab ---- */
html body :is(
  main .pi-tabs>a,
  #page-ipo .ipo-tabs>a,
  #page-ipo .ipo-discovery-nav>a,
  main .ds-tabs>:is(a,button),
  #market-view #market-tabs>button,
  #page-news .nx-tabs>.nx-tab,
  main .fi-switch>a,
  main .own-switch>a,
  #page-thesis .pt-tabs>.pt-tab,
  #page-strategy-lab .sl-tabs>a,
  #page-monitors .mart-tabs>.mart-tab,
  main .vc-tabs>.vc-tab,
  .hub-tabs .hub-tabs-row>.hub-tab,
  #page-investors-analysts .ia-view-group>.ia-view
){
  display:inline-flex!important;align-items:center!important;justify-content:center;gap:7px!important;flex-shrink:0;
  box-sizing:border-box!important;height:30px!important;min-height:30px!important;margin:0!important;padding:0 12px!important;
  border:0!important;border-radius:7px!important;box-shadow:none!important;outline-offset:-2px;
  background:transparent!important;color:var(--muted)!important;
  font:500 13px/1 Inter,Arial,sans-serif!important;text-decoration:none!important;white-space:nowrap;cursor:pointer;
}
html body :is(
  main .pi-tabs>a,
  #page-ipo .ipo-tabs>a,
  #page-ipo .ipo-discovery-nav>a,
  main .ds-tabs>:is(a,button),
  #market-view #market-tabs>button,
  #page-news .nx-tabs>.nx-tab,
  main .fi-switch>a,
  main .own-switch>a,
  #page-thesis .pt-tabs>.pt-tab,
  #page-strategy-lab .sl-tabs>a,
  #page-monitors .mart-tabs>.mart-tab,
  main .vc-tabs>.vc-tab,
  .hub-tabs .hub-tabs-row>.hub-tab,
  #page-investors-analysts .ia-view-group>.ia-view
) svg{width:14px;height:14px;flex:none;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* hover */
html body :is(
  main .pi-tabs>a,
  #page-ipo .ipo-tabs>a,
  #page-ipo .ipo-discovery-nav>a,
  main .ds-tabs>:is(a,button),
  #market-view #market-tabs>button,
  #page-news .nx-tabs>.nx-tab,
  main .fi-switch>a,
  main .own-switch>a,
  #page-thesis .pt-tabs>.pt-tab,
  #page-strategy-lab .sl-tabs>a,
  #page-monitors .mart-tabs>.mart-tab,
  main .vc-tabs>.vc-tab,
  .hub-tabs .hub-tabs-row>.hub-tab,
  #page-investors-analysts .ia-view-group>.ia-view
):hover{background:var(--hover)!important;background:var(--prism-tab-hover)!important;color:var(--text)!important;box-shadow:none!important}

/* selected: each row's own state attribute */
html body :is(
  main .pi-tabs>a[aria-current],
  #page-ipo .ipo-tabs>a.selected,
  #page-ipo .ipo-tabs>a[aria-selected="true"],
  #page-ipo .ipo-discovery-nav>a.selected,
  main .ds-tabs>:is(a,button)[aria-selected="true"],
  #market-view #market-tabs>button[aria-selected="true"],
  #page-news .nx-tabs>.nx-tab[aria-current],
  main .fi-switch>a[aria-current],
  main .own-switch>a[aria-current],
  #page-thesis .pt-tabs>.pt-tab[aria-current],
  #page-strategy-lab .sl-tabs>a[aria-current],
  #page-monitors .mart-tabs>.mart-tab[aria-selected="true"],
  main .vc-tabs>.vc-tab:is([aria-selected="true"],.on),
  .hub-tabs .hub-tabs-row>.hub-tab[aria-current],
  #page-investors-analysts .ia-view-group>.ia-view:is(.on,[aria-current])
){background:var(--selected)!important;background:var(--prism-tab-fill)!important;color:var(--text)!important;font-weight:500!important;box-shadow:none!important;border:0!important}

/* keyboard focus: a neutral ring, not the blue one */
html body :is(
  main .pi-tabs>a,
  #page-ipo .ipo-tabs>a,
  #page-ipo .ipo-discovery-nav>a,
  main .ds-tabs>:is(a,button),
  #market-view #market-tabs>button,
  #page-news .nx-tabs>.nx-tab,
  main .fi-switch>a,
  main .own-switch>a,
  #page-thesis .pt-tabs>.pt-tab,
  #page-strategy-lab .sl-tabs>a,
  #page-monitors .mart-tabs>.mart-tab,
  main .vc-tabs>.vc-tab,
  .hub-tabs .hub-tabs-row>.hub-tab,
  #page-investors-analysts .ia-view-group>.ia-view
):focus-visible{outline:2px solid var(--text)!important;outline-offset:-2px!important}

/* the Market tab counts stay quiet inside the tab */
html body #market-view #market-tabs>button .market-tab-count{color:inherit;opacity:.7}

/* phones: one scrolling row, same as before */
@media (max-width:640px){
  html body :is(main .pi-tabs,main .ds-tabs,#market-view #market-tabs,#page-news .nx-tabs,#page-ipo .ipo-tabs,#page-monitors .mart-tabs){flex-wrap:nowrap!important;overflow-x:auto!important;scrollbar-width:none}
  html body :is(main .pi-tabs>a,main .ds-tabs>:is(a,button),#market-view #market-tabs>button,#page-news .nx-tabs>.nx-tab,#page-ipo .ipo-tabs>a,#page-monitors .mart-tabs>.mart-tab){height:32px!important;min-height:32px!important;padding:0 10px!important}
}

/* ---- segmented filters (user, 7 Nov, Monitors All | Firing | Issues: "these should be the same as the charts primary
   tabs"): every .wsh-seg / .vc-seg loses its framed box and takes the tab look; no blue on the selected one ---- */
html body :is(.wsh-seg,.vc-seg){border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;gap:2px!important;height:auto!important}
html body :is(.wsh-seg,.vc-seg)>:is(a,button){display:inline-flex!important;align-items:center;gap:7px;height:30px!important;padding:0 12px!important;border:0!important;border-radius:7px!important;
  background:transparent!important;box-shadow:none!important;color:var(--muted)!important;font-weight:500!important}
html body :is(.wsh-seg,.vc-seg)>:is(a,button):hover{background:var(--prism-tab-hover)!important;color:var(--text)!important}
html body :is(.wsh-seg,.vc-seg)>:is([aria-pressed=true],[aria-current]:not([aria-current=false]),[aria-selected=true],.on,.active,.selected){
  background:var(--prism-tab-fill)!important;color:var(--text)!important}
html body :is(.wsh-seg,.vc-seg) .wsh-n{color:var(--muted)!important}
