/* ==========================================================================
   FN 20 — MARKETS
   --------------------------------------------------------------------------
   The design layer for the FUNDER trade environment (quote pages, index
   pages, market overview, security lists).

   Rules this layer holds itself to:

   1. No new colour values. Everything resolves through fn/01-tokens.css, so
      Light/Dark and the a11y contrast modes keep working without a second
      palette to maintain. Market up/down use --fn-market-up/--fn-market-down,
      which are deliberately separate from the brand green.
   2. One family with the rest of the site: Open Sans, via --fn-font-display
      and --fn-font-num. Headings stay compact. A financial surface does not
      pick up the article display size.
   3. Numbers are tabular and LTR. Hebrew pages are RTL, but a price column
      that reflows digits is unreadable; every numeric cell opts out locally.
   4. Density is earned. Rows are compact but never below the 36px that keeps a
      touch target legal, and nothing gets a whole row to itself just to hold
      one control.
   5. Mobile is designed, not shrunk. Tables become cards at the point where a
      column would have to be dropped to fit.
   ========================================================================== */

.fn-mkt {
  /* Local, markets-only aliases. Declared here rather than in 01-tokens so the
     global token file stays the single description of the *brand*, while these
     stay the description of this *surface*. */
  --fn-mkt-font-head: var(--fn-font-display);
  --fn-mkt-font-num: var(--fn-font-num);

  --fn-mkt-row-h: 40px;
  --fn-mkt-row-h-compact: 36px;
  --fn-mkt-gap: var(--fn-space-4);
  --fn-mkt-card-pad: var(--fn-space-4);
  /* Chart plot height on the index page from 992px, where the plot (not the
     composition card beside it) sets the quote stage's height. */
  --fn-mkt-plot-h-comp: clamp(360px, 60vh, 600px);

  /* The two bars this shell pins under the site chrome. Three things stack
     on them: the page nav sticks under the sub-nav, a section jump lands
     under both, and the shared sticky table header (37-sticky-head) clears
     them through --fn-sticky-stack.

       --fn-mkt-*-min  the bar's minimum height (48/44: the heights the chip
                       rows had on their own). The bar may grow past it,
                       e.g. under a larger text size.
       --fn-mkt-*-h    the bar's height as everything else reads it. It is
                       the minimum until fn-markets.js measures the real bar
                       and publishes its height on .fn-mkt, so the stack
                       follows a bar that grew. */
  --fn-mkt-subnav-min: 48px;
  --fn-mkt-pagenav-min: 44px;
  --fn-mkt-subnav-h: var(--fn-mkt-subnav-min);
  --fn-mkt-pagenav-h: var(--fn-mkt-pagenav-min);
  --fn-sticky-stack: var(--fn-mkt-subnav-h);

  /* Zebra is a wash of the sunken surface, not a grey of its own, so it tracks
     the theme instead of needing a dark-mode override. */
  --fn-mkt-zebra: color-mix(in srgb, var(--fn-bg-sunken) 55%, var(--fn-bg-surface));

  font-family: var(--fn-font-ui);
  color: var(--fn-text-1);
}

/* color-mix is recent; without it zebra silently falls back to the surface
   colour (i.e. no striping), which is a safe degradation rather than a bug. */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .fn-mkt { --fn-mkt-zebra: var(--fn-bg-sunken); }
}

.fn-mkt *,
.fn-mkt *::before,
.fn-mkt *::after { box-sizing: border-box; }

/* Numeric primitive. Applied to any cell or value that holds a number, so
   digits stay LTR and column-aligned inside the RTL document. */
.fn-mkt .fn-num {
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

/* Market direction. Shared by values, pills, chart legends and table cells. */
.fn-mkt .is-up    { color: var(--fn-market-up); }
.fn-mkt .is-down  { color: var(--fn-market-down); }
.fn-mkt .is-flat  { color: var(--fn-text-2); }


/* ==========================================================================
   1. SHELL + SECONDARY NAV
   --------------------------------------------------------------------------
   One low row of chips. It must not read as a second header: no logo, no
   search, no background band competing with the site header above it.
   ========================================================================== */

.fn-mkt__content { min-width: 0; }

/* The legacy chart row cancels the container's 15px padding, so the quote
   runs 15px past the header and the market nav and stops 12px short of the
   side banners. Keeping the row margin at 0 puts the quote on the same edge
   as the nav above it. */
.fn-mkt .rowsss > .padNone > .row {
  margin-left: 0;
  margin-right: 0;
}

.fn-mkt-subnav {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--fn-mkt-subnav-min);
  margin: 0 0 var(--fn-space-5);
  background: var(--fn-bg-canvas);
  border-bottom: 1px solid var(--fn-border);
}

.fn-mkt-subnav__list {
  display: flex;
  align-items: center;
  gap: var(--fn-space-1);
  margin: 0;
  padding: var(--fn-space-2) 0;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.fn-mkt-subnav__list::-webkit-scrollbar { display: none; }

.fn-mkt-subnav__link {
  display: block;
  padding: 6px var(--fn-space-3);
  border-radius: var(--fn-radius-pill);
  font-family: var(--fn-mkt-font-head);
  font-size: var(--fn-fs-base);
  font-weight: var(--fn-fw-medium);
  line-height: 1.35;
  color: var(--fn-text-2);
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--fn-dur-fast) var(--fn-ease),
              color var(--fn-dur-fast) var(--fn-ease);
}

.fn-mkt-subnav__link:hover,
.fn-mkt-subnav__link:focus-visible {
  background: var(--fn-bg-hover);
  color: var(--fn-text-1);
  text-decoration: none;
}

.fn-mkt-subnav__link.is-active {
  background: var(--fn-accent);
  color: var(--fn-on-accent);
}

/* Night: the bright accent with near-black ink reads as a black label on the
   dark band. Same selected chip, with light text on the deeper green that
   still clears contrast. */
:root[data-fn-theme="dark"] .fn-mkt-subnav__link.is-active {
  background: var(--fn-green-700);
  color: #FFFFFF;
}

/* On mobile the site header pins (its height is --fn-chrome-bar, 01-tokens),
   so the subnav has to stick *below* it rather than at the viewport top. */
@media (max-width: 767px) {
  .fn-ui.fn-header--compact .fn-mkt-subnav {
    top: var(--fn-chrome-bar);
  }
  .fn-mkt-subnav {
    margin-bottom: var(--fn-space-4);
    /* Bleed to the viewport edges so the scrolling chip row does not look
       clipped inside the container's gutter.

       15px, not --fn-space-4: this has to cancel Bootstrap 3's .container
       padding exactly, and that padding is 15px. Using the 16px token
       overshot by 1px on each side, which was enough to give the whole page a
       horizontal scrollbar on every mobile width. */
    margin-inline: -15px;
    padding-inline: 15px;
  }
}


/* ==========================================================================
   2. SECTIONS + INTERNAL PAGE NAV
   ========================================================================== */

/* A jump lands one breath under both pinned bars. */
.fn-mkt-section {
  margin: 0 0 var(--fn-space-8);
  scroll-margin-top: calc(var(--fn-mkt-subnav-h) + var(--fn-mkt-pagenav-h) + var(--fn-chrome-breath));
}

/* Wraps. Without flex-wrap the title and its note were laid out on one line
   whatever the width: at 390px the note was crushed to 63px and still hung
   100px off the start edge, which gave the whole document a horizontal
   scrollbar. min-width:0 lets the children actually shrink instead of
   refusing to go below their content width. */
.fn-mkt-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fn-space-1) var(--fn-space-3);
  margin: 0 0 var(--fn-space-3);
}

/* The head must occupy the section's full width. Without this it was
   computing to width 0 with its children overflowing (scrollWidth 40-63 on a
   zero-width box), which is what put 48px of horizontal scroll on the
   document after the wrap fix. */
.fn-mkt-section__head { width: 100%; }

/* Let long Hebrew titles and notes break instead of forcing the row wider
   than the column. min-width:0 alone is not enough: a flex item still refuses
   to shrink below the longest unbreakable word. */
.fn-mkt-section__head > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Below the wrap point the note is a line of its own under the title, which
   is where it reads best anyway. */
@media (max-width: 767px) {
  .fn-mkt-section__head .fn-mkt-section__title { flex: 1 1 auto; }
  .fn-mkt-section__head .fn-mkt-section__note { flex: 1 1 100%; }
}

.fn-mkt-section__title {
  margin: 0;
  font-family: var(--fn-mkt-font-head);
  font-size: var(--fn-fs-lg);
  font-weight: var(--fn-fw-bold);
  line-height: var(--fn-leading-tight);
  letter-spacing: var(--fn-track-tight);
  color: var(--fn-text-1);
}

/* Secondary text that qualifies a section - e.g. that fund holdings are
   periodic reports, not live. Never decorative filler. */
.fn-mkt-section__note {
  margin: 0;
  font-size: var(--fn-fs-sm);
  line-height: var(--fn-leading-base);
  color: var(--fn-text-3);
}

.fn-mkt-section__actions {
  display: flex;
  align-items: center;
  gap: var(--fn-space-2);
  flex-shrink: 0;
}

/* In-page nav for the quote page (chart / data / performance / company /
   holdings). Sticks under the subnav; stays one row.

   It used to stick at a hard 41px, 7px inside a 48px subnav, so the pinned
   nav lost its top padding under the subnav. Everything below the two bars
   (a table header, a section jump) has to know where they end, so the
   stack height is published from here as --fn-sticky-stack for the content
   that follows the nav. */
.fn-mkt-pagenav {
  position: sticky;
  top: var(--fn-mkt-subnav-h);
  z-index: 19;
  min-height: var(--fn-mkt-pagenav-min);
  margin: 0 0 var(--fn-space-5);
  padding: var(--fn-space-2) 0;
  background: var(--fn-bg-canvas);
  border-bottom: 1px solid var(--fn-border);
}

.fn-mkt-pagenav__list {
  display: flex;
  gap: var(--fn-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.fn-mkt-pagenav__list::-webkit-scrollbar { display: none; }

.fn-mkt-pagenav__link {
  display: block;
  padding: 5px var(--fn-space-3);
  border-radius: var(--fn-radius-sm);
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-medium);
  color: var(--fn-text-2);
  white-space: nowrap;
  text-decoration: none;
}
.fn-mkt-pagenav__link:hover,
.fn-mkt-pagenav__link:focus-visible {
  background: var(--fn-bg-hover);
  color: var(--fn-text-1);
  text-decoration: none;
}
.fn-mkt-pagenav__link.is-active {
  background: var(--fn-bg-active);
  color: var(--fn-text-1);
}
/* display:block on the link beats bootstrap's [hidden] (same specificity,
   no !important). A hidden item must stay off screen. */
.fn-mkt-pagenav__link[hidden],
.fn-mkt-pagenav__list > li[hidden] {
  display: none !important;
}

.fn-mkt-pagenav ~ * {
  --fn-sticky-stack: calc(var(--fn-mkt-subnav-h) + var(--fn-mkt-pagenav-h));
}

@media (max-width: 767px) {
  .fn-ui.fn-header--compact .fn-mkt-pagenav {
    top: calc(var(--fn-chrome-bar) + var(--fn-mkt-subnav-h));
  }
}


/* ==========================================================================
   3. CARD
   ========================================================================== */

.fn-mkt-card {
  padding: var(--fn-mkt-card-pad);
  background: var(--fn-bg-surface);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-md);
}

/* Dark gets its depth from the border, not a shadow that cannot be seen. */
:root:not([data-fn-theme="dark"]) .fn-mkt-card { box-shadow: var(--fn-shadow-sm); }

.fn-mkt-card--flush { padding: 0; overflow: hidden; }

.fn-mkt-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fn-space-2);
  padding: var(--fn-space-3) var(--fn-mkt-card-pad);
  border-bottom: 1px solid var(--fn-border);
}

.fn-mkt-card__title {
  margin: 0;
  font-family: var(--fn-mkt-font-head);
  font-size: var(--fn-fs-md);
  font-weight: var(--fn-fw-bold);
  color: var(--fn-text-1);
}

.fn-mkt-card__link {
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-medium);
  color: var(--fn-brand);
  text-decoration: none;
  white-space: nowrap;
}
.fn-mkt-card__link:hover { text-decoration: underline; }


/* ==========================================================================
   4. QUOTE HERO
   --------------------------------------------------------------------------
   The top of a quote or index page. Everything identifying and pricing the
   paper lives in one block: name, symbol, id, last, change, status, time,
   turnover, actions. No row is spent on a single control.
   ========================================================================== */

/* Laid out the way the Yahoo app lays it out, one column, everything aligned
   to the start edge: venue line, name, then the price as the loudest element
   and one quiet status line under it. The actions are small and sit at the
   end of the name row, so nothing floats in the middle of a wide screen. */
.fn-mkt-quote {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "id   actions"
    "body body";
  align-items: start;
  gap: var(--fn-space-1) var(--fn-space-4);
  margin: 0 0 var(--fn-space-4);
  padding: 0;
  border: 0;
}

.fn-mkt-quote__id { grid-area: id; min-width: 0; }
.fn-mkt-quote__body { grid-area: body; min-width: 0; }

/* Name on its own row, price and actions on the next, so the buttons sit
   beside the price instead of floating above an empty band. */
.fn-mkt-quote--stack {
  grid-template-areas:
    "id id"
    "body actions";
  align-items: end;
}
.fn-mkt-quote--stack .fn-mkt-quote__actions { align-self: end; padding-top: 0; padding-bottom: 6px; }

/* Exchange + currency + paper number on one quiet line above the name. */
.fn-mkt-quote__venue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 6px;
  margin: 0 0 2px;
  font-size: var(--fn-fs-xs);
  font-weight: var(--fn-fw-regular);
  line-height: 1.5;
  color: var(--fn-text-3);
}

.fn-mkt-quote__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px var(--fn-space-2);
  margin: 0;
  font-family: var(--fn-mkt-font-head);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: var(--fn-fw-bold);
  line-height: 1.2;
  letter-spacing: var(--fn-track-tight);
  color: var(--fn-text-1);
}

/* Symbol / paper number / ISIN / sector - the identity line. */
.fn-mkt-quote__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fn-space-1) var(--fn-space-2);
  margin: 0;
  font-size: var(--fn-fs-sm);
  line-height: 1.4;
  color: var(--fn-text-3);
}

.fn-mkt-quote__meta > * { display: inline-flex; align-items: center; gap: 4px; }

.fn-mkt-quote__meta-sep { color: var(--fn-border-strong); }

.fn-mkt-quote__symbol {
  padding: 1px 6px;
  background: var(--fn-bg-sunken);
  border-radius: var(--fn-radius-sm);
  font-family: var(--fn-mkt-font-num);
  font-size: var(--fn-fs-xs);
  font-weight: var(--fn-fw-bold);
  letter-spacing: 0.03em;
  color: var(--fn-text-2);
  direction: ltr;
  unicode-bidi: isolate;
}

/* --- price block --- */
.fn-mkt-quote__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--fn-space-3);
  margin-top: var(--fn-space-2);
  /* Index and fund pages fill the price in from script; the line keeps
     its height so nothing below it (the chart, "כלי גרף") jumps. Same
     size as .fn-mkt-quote__last, whose line-height is 1. */
  min-height: clamp(32px, 4.2vw, 44px);
}

/* The price is the anchor of the page and is sized accordingly: in the
   reference it is roughly double the name and four times the status line. */
.fn-mkt-quote__last {
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  font-size: clamp(32px, 4.2vw, 44px);
  font-weight: var(--fn-fw-extrabold);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fn-text-1);
  direction: ltr;
  unicode-bidi: isolate;
}

.fn-mkt-quote__unit {
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-regular);
  color: var(--fn-text-3);
}

/* One line, absolute move first and the percent in brackets after it -
   "+63.25 (+0.82%)" - as the reference prints it. Stacking the two made the
   hero taller for no gain and read as two separate figures. */
.fn-mkt-quote__delta {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  padding-bottom: 0;
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  font-size: var(--fn-fs-lg);
  font-weight: var(--fn-fw-bold);
  line-height: 1.2;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.fn-mkt-quote__delta-abs {
  font-size: var(--fn-fs-lg);
  font-weight: var(--fn-fw-bold);
}

/* The old chart stylesheet paints .lastChartDatas #a8a49a !important (and
   12px under 768px). On the intraday quote that class is the level and the
   day change, so it has to follow the quote tokens: black level, green/red
   move, quiet meta. */
.fn-mkt-quote .lastChartDatas {
  float: none !important;
  padding: 0 !important;
}
.fn-mkt-quote .fn-mkt-quote__last.lastChartDatas {
  color: var(--fn-text-1) !important;
  font-size: clamp(32px, 4.2vw, 44px) !important;
  font-weight: var(--fn-fw-extrabold) !important;
}
.fn-mkt-quote .fn-mkt-quote__delta.lastChartDatas {
  font-size: var(--fn-fs-lg) !important;
  font-weight: var(--fn-fw-bold) !important;
  color: var(--fn-text-1) !important;
}
.fn-mkt-quote .fn-mkt-quote__delta.lastChartDatas.is-up { color: var(--fn-market-up) !important; }
.fn-mkt-quote .fn-mkt-quote__delta.lastChartDatas.is-down { color: var(--fn-market-down) !important; }
.fn-mkt-quote .fn-mkt-quote__meta .lastChartDatas,
.fn-mkt-quote .fn-mkt-quote__status .lastChartDatas {
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
}
:root[data-fn-theme="dark"] .fn-mkt-quote .fn-mkt-quote__delta.lastChartDatas.is-up { color: var(--fn-up-300) !important; }
:root[data-fn-theme="dark"] .fn-mkt-quote .fn-mkt-quote__delta.lastChartDatas.is-down { color: var(--fn-down-300) !important; }

/* --- status + timestamp --- */
.fn-mkt-quote__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fn-space-1) var(--fn-space-3);
  margin-top: var(--fn-space-2);
  font-size: var(--fn-fs-xs);
  color: var(--fn-text-3);
  /* Room for the status pill (a line plus its 2px padding) before the
     script shows it. */
  min-height: 20px;
  min-height: calc(1lh + 4px);
}

.fn-mkt-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--fn-radius-pill);
  background: var(--fn-bg-sunken);
  font-size: var(--fn-fs-xs);
  font-weight: var(--fn-fw-medium);
  color: var(--fn-text-2);
}

.fn-mkt-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fn-text-3);
  flex-shrink: 0;
}

.fn-mkt-status--open { color: var(--fn-market-up); }
.fn-mkt-status--open .fn-mkt-status__dot { background: var(--fn-market-up); }
.fn-mkt-status--closed { color: var(--fn-text-2); }

/* --- hero actions --- */
.fn-mkt-quote__actions {
  grid-area: actions;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--fn-space-2);
  padding-top: 2px;
}

.fn-mkt-quote__msg:empty { display: none; }
.fn-mkt-quote__msg {
  font-size: var(--fn-fs-xs);
  font-weight: var(--fn-fw-medium);
  color: var(--fn-brand);
  white-space: nowrap;
}

/* Watchlist toggle. market-watchlist.js flips the pair with an inline
   display:inline/none; !important keeps the shown one a flex row without
   touching the hidden state. */
.fn-mkt-btn.fn-mkt-btn--watch:not([style*="none"]) { display: inline-flex !important; }
.fn-mkt-btn.fn-mkt-btn--watch {
  gap: 6px;
  min-height: 32px;
  padding: 0 14px 0 12px;
  border: 0;
  background: var(--fn-accent);
  color: var(--fn-on-accent);
  white-space: nowrap;
}
.fn-mkt-btn.fn-mkt-btn--watch:hover,
.fn-mkt-btn.fn-mkt-btn--watch:focus-visible {
  background: var(--fn-accent-hover);
  border-color: transparent;
  color: var(--fn-on-accent);
}
.fn-mkt-btn.fn-mkt-btn--watch:focus-visible {
  outline: var(--fn-focus-width) solid var(--fn-focus);
  outline-offset: 2px;
}
.fn-mkt-btn.fn-mkt-btn--watch .fn-mkt-btn__label { line-height: 1; }
.fn-mkt-btn.fn-mkt-btn--watch.is-on {
  background: var(--fn-brand-soft);
  color: var(--fn-brand);
}

.fn-mkt-ico--star {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3.2l2.7 5.5 6 .9-4.35 4.25 1.03 6L12 17l-5.38 2.85 1.03-6L3.3 9.6l6-.9z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3.2l2.7 5.5 6 .9-4.35 4.25 1.03 6L12 17l-5.38 2.85 1.03-6L3.3 9.6l6-.9z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--fn-dur-fast) var(--fn-ease);
}
.fn-mkt-btn.fn-mkt-btn--watch:hover .fn-mkt-ico--star { transform: scale(1.08); }
.fn-mkt-btn.fn-mkt-btn--watch.is-on .fn-mkt-ico--star {
  background-color: var(--fn-accent);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3.2l2.7 5.5 6 .9-4.35 4.25 1.03 6L12 17l-5.38 2.85 1.03-6L3.3 9.6l6-.9z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3.2l2.7 5.5 6 .9-4.35 4.25 1.03 6L12 17l-5.38 2.85 1.03-6L3.3 9.6l6-.9z'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: reduce) {
  .fn-mkt-ico--star { transition: none; }
  .fn-mkt-btn.fn-mkt-btn--watch:hover .fn-mkt-ico--star { transform: none; }
}

.fn-mkt-btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--fn-text-2);
}

/* Phone: the price is the first thing under the name, the actions shrink to
   an icon so the name keeps the full row. */
@media (max-width: 600px) {
  .fn-mkt-quote { gap: 0 var(--fn-space-2); margin-bottom: var(--fn-space-3); }
  .fn-mkt-quote__name { font-size: 20px; }
  .fn-mkt-quote__holders,
  .fn-mkt-btn.fn-mkt-btn--watch .fn-mkt-btn__label { display: none !important; }
  .fn-mkt-btn.fn-mkt-btn--watch { width: 40px; min-height: 40px; padding: 0; }
  .fn-mkt-btn.fn-mkt-btn--watch .fn-mkt-ico--star { width: 18px; height: 18px; flex-basis: 18px; }
  .fn-mkt-quote__price { margin-top: var(--fn-space-1); min-height: 36px; }
  .fn-mkt-quote__last,
  .fn-mkt-quote .fn-mkt-quote__last.lastChartDatas { font-size: 36px !important; }
  .fn-mkt-quote__delta,
  .fn-mkt-quote__delta-abs,
  .fn-mkt-quote .fn-mkt-quote__delta.lastChartDatas { font-size: var(--fn-fs-md) !important; }
  .fn-mkt-quote__status { margin-top: var(--fn-space-1); gap: 2px var(--fn-space-2); }
}

/* The proxy textarea the chart's label-annotation tool types into. It has to
   stay focusable, so it is moved out of sight rather than removed. */
textarea.labeltxt,
textarea#annotation-label {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
  resize: none;
}


/* ==========================================================================
   5. BUTTONS / CHIPS
   ========================================================================== */

.fn-mkt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--fn-radius-pill);
  background: var(--fn-bg-sunken);
  font-family: var(--fn-mkt-font-head);
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-medium);
  line-height: 1;
  color: var(--fn-text-1);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--fn-dur-fast) var(--fn-ease),
              color var(--fn-dur-fast) var(--fn-ease);
}

.fn-mkt-btn:hover,
.fn-mkt-btn:focus-visible {
  background: var(--fn-bg-hover);
  color: var(--fn-text-1);
  text-decoration: none;
}

.fn-mkt-btn.fn-mkt-btn--ghost {
  background: transparent;
}

.fn-mkt-btn--primary {
  background: var(--fn-accent);
  border-color: var(--fn-accent);
  color: var(--fn-on-accent);
}
.fn-mkt-btn--primary:hover,
.fn-mkt-btn--primary:focus-visible {
  background: var(--fn-accent-hover);
  border-color: var(--fn-accent-hover);
  color: var(--fn-on-accent);
}

.fn-mkt-btn[aria-pressed="true"] {
  background: var(--fn-accent);
  border-color: var(--fn-accent);
  color: var(--fn-on-accent);
}


/* ==========================================================================
   6. STAT GRID — market snapshot
   --------------------------------------------------------------------------
   Replaces the old "label: value" table. Auto-fit so the same markup is a
   6-up strip on desktop and a 2-up grid on a 320px phone without a media
   query per breakpoint.
   ========================================================================== */

/* Key/value rows, the "Key Statistics" pattern: label on the start edge,
   value on the end edge of the same row, a dashed rule between rows. Each
   label sits next to its own number, so a wide screen cannot pull them apart,
   and a phone fits two columns. */
.fn-mkt-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  column-gap: var(--fn-space-6);
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--fn-border);
}

.fn-mkt-stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "sub   value";
  align-items: center;
  column-gap: var(--fn-space-3);
  min-width: 0;
  min-height: 38px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--fn-border-strong);
  background: transparent;
}

.fn-mkt-stat__label {
  grid-area: label;
  min-width: 0;
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-regular);
  line-height: 1.3;
  color: var(--fn-text-2);
}

.fn-mkt-stat__value {
  grid-area: value;
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  font-size: var(--fn-fs-base);
  font-weight: var(--fn-fw-bold);
  line-height: 1.25;
  color: var(--fn-text-1);
  text-align: left;
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
}

.fn-mkt-stat__sub {
  grid-area: sub;
  font-size: 11px;
  line-height: 1.3;
  color: var(--fn-text-3);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
}

/* Text values (company name, sector) may be long; let them wrap rather than
   push the row wider than its column. */
.fn-mkt-stat__value.fn-mkt-rtl,
.fn-mkt-stat__value[dir="rtl"] { direction: rtl; white-space: normal; text-align: left; }
.fn-mkt-stat__value a {
  color: var(--fn-brand);
  text-decoration: none;
}
.fn-mkt-stat__value a:hover,
.fn-mkt-stat__value a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 600px) {
  .fn-mkt-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--fn-space-4);
  }
  .fn-mkt-stat { min-height: 34px; padding: 5px 0; column-gap: var(--fn-space-2); }
  .fn-mkt-stat__label { font-size: var(--fn-fs-xs); }
  .fn-mkt-stat__value { font-size: var(--fn-fs-sm); }
}
@media (max-width: 340px) {
  .fn-mkt-stats { grid-template-columns: minmax(0, 1fr); }
}

/* Value not available. Shown as an explicit dash rather than a zero, because a
   zero price is a statement and a missing price is not. */
.fn-mkt-stat__value--na,
.fn-mkt .fn-na { color: var(--fn-text-3); font-weight: var(--fn-fw-regular); }

/* 52-week (or period) range bar: where the last price sits in the range.
   Left-to-right number line: low at the left, last price along it, high at
   the right. The caption stays outside, in the RTL card. direction is set
   here so the fill (which grows from inline-start) and the end labels
   describe the same edge. */
.fn-mkt-range { display: flex; flex-direction: column; gap: 5px; direction: ltr; }

.fn-mkt-range__track {
  position: relative;
  height: 4px;
  border-radius: var(--fn-radius-pill);
  background: var(--fn-bg-active);
}

.fn-mkt-range__fill {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  border-radius: var(--fn-radius-pill);
  background: var(--fn-accent);
}

.fn-mkt-range__marker {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fn-bg-surface);
  box-shadow: 0 0 0 2px var(--fn-text-1);
  transform: translate(-50%, -50%);
}

.fn-mkt-range__ends {
  display: flex;
  justify-content: space-between;
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  font-size: var(--fn-fs-xs);
  color: var(--fn-text-3);
}

/* Values that mix digits with Hebrew words ("48 אלף ₪", "30 ימי מסחר").
   Applied by FNMarkets.render.dirClassFor. */
.fn-mkt .fn-mkt-rtl {
  direction: rtl;
  unicode-bidi: isolate;
}


/* ==========================================================================
   7. PERFORMANCE STRIP
   --------------------------------------------------------------------------
   Period returns. Price return only - the series carries no dividend data, so
   the page says so next to the numbers rather than implying total return.
   ========================================================================== */

.fn-mkt-perf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 1px;
  background: var(--fn-border);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-md);
  overflow: hidden;
}

.fn-mkt-perf__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--fn-space-3) var(--fn-space-2);
  background: var(--fn-bg-surface);
  text-align: center;
}

.fn-mkt-perf__label {
  font-size: var(--fn-fs-xs);
  color: var(--fn-text-3);
}

.fn-mkt-perf__value {
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  font-size: var(--fn-fs-md);
  font-weight: var(--fn-fw-bold);
  line-height: 1.2;
  direction: ltr;
  unicode-bidi: isolate;
}


/* ==========================================================================
   8. CHART SHELL
   --------------------------------------------------------------------------
   Wraps whichever charting engine renders inside. The range tabs and the
   toolbar live on the same row as nothing else, and the plot is LTR because
   a time axis that runs right-to-left misreads as a falling series.
   ========================================================================== */

/* No card.

   In the Yahoo Finance app the price chart sits directly on the page: no
   border, no surface fill, no rounded corners, no shadow - the plot IS the
   element. Wrapping it in a card, as this layer did, framed the one thing on
   the page that should read as unmediated data and cost horizontal room on a
   360px screen. The chart is now full-bleed within the content column. */
.fn-mkt-chart {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

/* The bar is not a box. Its children join the chart column, so a page can
   park the period rail under the plot and keep the icon tools above it. */
.fn-mkt-chart__bar { display: contents; }
.fn-mkt-chart__plot { order: 1; width: 100%; }
.fn-mkt-chart > .drawingtool {
  display: flex;
  justify-content: center;
  order: 0;
  width: 100%;
  float: none;
  margin: 0 0 var(--fn-space-2) !important;
  padding: 0 !important;
}
.fn-mkt-chart__tools {
  order: 0;
  align-self: flex-end;
  margin-bottom: var(--fn-space-2);
}

/* Range selector — segmented control on a sunken track, matching the shape
   Yahoo uses: one pill rail, the active range a filled pill inside it.
   Scrolls rather than wraps, so eight ranges still fit a 320px screen on one
   line. */
.fn-mkt-ranges {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 3px;
  background: var(--fn-bg-sunken);
  border-radius: var(--fn-radius-pill);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* One order for every market range rail: the short period (יום / תוך-יומי)
     on the right, the long period (5 שנים) on the left. The DOM stays
     short-to-long and each button keeps its data-fn-range and href, so the
     zoom still uses that key and not the button's screen position. */
  direction: rtl;
  order: 2;
  align-self: center;
  width: max-content;
  max-width: 100%;
  margin-top: 12px;
}
.fn-mkt-ranges::-webkit-scrollbar { display: none; }

.fn-mkt-ranges__btn {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  border-radius: var(--fn-radius-pill);
  background: transparent;
  font-family: var(--fn-mkt-font-head);
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-medium);
  line-height: 1;
  color: var(--fn-text-2);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--fn-dur-fast) var(--fn-ease),
              color var(--fn-dur-fast) var(--fn-ease);
}
.fn-mkt-ranges__btn:hover,
.fn-mkt-ranges__btn:focus-visible {
  background: var(--fn-bg-hover);
  color: var(--fn-text-1);
  text-decoration: none;
}
.fn-mkt-ranges__btn[aria-pressed="true"] {
  background: var(--fn-accent);
  color: var(--fn-on-accent);
  font-weight: var(--fn-fw-bold);
}


/* --------------------------------------------------------------------------
   Icon buttons + icons.

   Udi: "כפתורים גדולים מאוד". The secondary chart controls carried full text
   labels, which is what pushed the control row onto two lines. They are icon
   buttons now, the same move Yahoo makes (fullscreen + gear and nothing else).
   Icons are drawn in CSS so they need no font or sprite and inherit colour in
   both themes.
   -------------------------------------------------------------------------- */
.fn-mkt-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--fn-radius-sm);
  background: transparent;
  color: var(--fn-text-2);
  cursor: pointer;
  transition: background var(--fn-dur-fast) var(--fn-ease),
              color var(--fn-dur-fast) var(--fn-ease);
}
.fn-mkt-iconbtn:hover,
.fn-mkt-iconbtn:focus-visible,
.fn-mkt-iconbtn[aria-expanded="true"] {
  background: var(--fn-bg-hover);
  color: var(--fn-text-1);
}

.fn-mkt-ico {
  position: relative;
  display: block;
  width: 15px;
  height: 15px;
}

/* Drawing tools: a pen nib. */
.fn-mkt-ico--tools::before {
  content: "";
  position: absolute;
  inset: 1px 2px 4px 2px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
}
.fn-mkt-ico--tools::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 0;
  border: 4px solid transparent;
  border-top-color: currentColor;
  transform: translateX(-50%);
}

/* Settings: a gear, reduced to a ring plus a hub — legible at 15px, which a
   real cogwheel is not. */
.fn-mkt-ico--gear::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  border-style: dashed;
}
.fn-mkt-ico--gear::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: currentColor;
  border-radius: 50%;
}

.fn-mkt-chart__tools {
  display: flex;
  align-items: center;
  gap: var(--fn-space-2);
  font-size: var(--fn-fs-sm);
  color: var(--fn-text-2);
}

.fn-mkt-chart__toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-regular);
  color: var(--fn-text-2);
  cursor: pointer;
  user-select: none;
}

/* --------------------------------------------------------------------------
   DROPDOWNS — the whole family, closed AND open.

   This is where the previous round failed: only the trigger was styled, so the
   moment a menu opened the reader got Bootstrap 3's 2013 default — white box,
   blue hover, LTR padding, wrong font — on top of a dark financial page.

   Covered here:
     .fn-mkt-dd            our own trigger + menu
     .dropdown-menu        every Bootstrap dropdown inside the trade shell
     .bootstrap-select     the chart toolbar's select widget
     select                native selects (toolbar, filters)

   Rules that apply to all of them: one height, RTL alignment, no text
   wrapping, a menu that cannot be clipped, and visible focus.
   -------------------------------------------------------------------------- */

/* --- the menu surface, whoever opened it --- */
.fn-mkt .dropdown-menu,
.fn-mkt .fn-mkt-dd__menu,
.fn-mkt .bootstrap-select .dropdown-menu {
  min-width: 164px;
  max-height: min(60vh, 380px);
  margin: 6px 0 0;
  padding: var(--fn-space-1);
  background: var(--fn-bg-raised);
  border: 1px solid var(--fn-border-strong);
  border-radius: var(--fn-radius-md);
  box-shadow: var(--fn-shadow-pop);
  font-family: var(--fn-font-ui);
  font-size: var(--fn-fs-base);
  text-align: right;
  direction: rtl;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Above the sticky subnav (20) and page nav (19); below the site header. */
  z-index: 1025;
}

.fn-mkt .dropdown-menu > li > a,
.fn-mkt .fn-mkt-dd__menu > li > a,
.fn-mkt .bootstrap-select .dropdown-menu li a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--fn-radius-sm);
  background: transparent;
  font-size: var(--fn-fs-base);
  font-weight: var(--fn-fw-regular);
  line-height: 1.4;
  color: var(--fn-text-1);
  text-align: right;
  white-space: nowrap;
  text-decoration: none;
}

.fn-mkt .dropdown-menu > li > a:hover,
.fn-mkt .dropdown-menu > li > a:focus,
.fn-mkt .fn-mkt-dd__menu > li > a:hover,
.fn-mkt .fn-mkt-dd__menu > li > a:focus,
.fn-mkt .bootstrap-select .dropdown-menu li a:hover {
  background: var(--fn-bg-hover);
  color: var(--fn-text-1);
}

/* Bootstrap paints the selected row blue; market UI uses the brand accent. */
.fn-mkt .dropdown-menu > .active > a,
.fn-mkt .dropdown-menu > .active > a:hover,
.fn-mkt .bootstrap-select .dropdown-menu li.selected a {
  background: var(--fn-accent);
  color: var(--fn-on-accent);
  font-weight: var(--fn-fw-medium);
}

.fn-mkt .dropdown-menu > .disabled > a,
.fn-mkt .bootstrap-select .dropdown-menu li.disabled a {
  color: var(--fn-text-3);
  opacity: 0.55;
  cursor: not-allowed;
}

.fn-mkt .dropdown-menu .divider {
  height: 1px;
  margin: var(--fn-space-1) 0;
  background: var(--fn-border);
}

/* A non-interactive heading inside a menu. */
.fn-mkt .fn-mkt-dd__label {
  padding: 5px 10px 3px;
  font-size: var(--fn-fs-xs);
  font-weight: var(--fn-fw-bold);
  letter-spacing: 0.02em;
  color: var(--fn-text-3);
  text-transform: uppercase;
  pointer-events: none;
}

/* The menu is positioned relative to its trigger; without this it anchors to
   the page and can open off-screen on mobile. */
.fn-mkt .fn-mkt-dd,
.fn-mkt .dropdown { position: relative; }

/* RTL: menus open from the right edge of the trigger, not the left. */
.fn-mkt .dropdown-menu { right: 0; left: auto; }

/* Near the viewport's end a menu would otherwise be cut off. */
@media (max-width: 767px) {
  .fn-mkt .dropdown-menu,
  .fn-mkt .fn-mkt-dd__menu {
    max-width: calc(100vw - 24px);
    min-width: 150px;
  }
}

/* The chart tool icons sit at the END (left) edge of the bar, so their menus
   open inward from the left edge instead of running off the screen. */
.fn-mkt .fn-mkt-chart__tools .dropdown-menu { left: 0; right: auto; }

/* --------------------------------------------------------------------------
   CHART TOOLS PANEL — the pro drawing toolbar (#drawingToolsPanel)

   The markup is the original AnyChart tools toolbar: Bootstrap 3 .btn-default
   buttons, hover panels (.dropdown2/3/4) and bootstrap-select widgets, all
   carrying page-level gold-on-navy rules. Everything here is scoped through
   the panel id so it outranks those rules without touching their markup.
   -------------------------------------------------------------------------- */
.fn-mkt .drawingtool { height: auto !important; padding: 0 !important; margin: 0 0 var(--fn-space-3); }
.fn-mkt .drawingtool[hidden] { display: none !important; margin: 0 !important; }
.fn-mkt-chart > .drawingtool {
  display: flex;
  justify-content: center;
  grid-column: auto;
  width: 100%;
  float: none;
  margin: 0 0 var(--fn-space-2) !important;
  padding: 0 !important;
}

/* One toolbar, every chart page. The gold skin sets 26px gold chips with an
   id selector; .toolbar here is the extra class that outranks it, so sec,
   seco, indices, forex and funds all get the same control. */
.fn-mkt #drawingToolsPanel,
.fn-mkt #drawingToolsPanel.toolbar {
  --fn-tool-h: 32px;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 0;
  overflow: visible;
  width: 100% !important;
  max-width: 100%;
  margin: 0 !important;
  padding: 3px !important;
  background: var(--fn-bg-surface) !important;
  background-image: none !important;
  border: 1px solid var(--fn-border) !important;
  border-radius: var(--fn-radius-md) !important;
  box-shadow: none !important;
  direction: rtl;
}

.fn-mkt #drawingToolsPanel .btn-group,
.fn-mkt #drawingToolsPanel .btn-group-container,
.fn-mkt #drawingToolsPanel .dropdown,
.fn-mkt #drawingToolsPanel .dropdown2,
.fn-mkt #drawingToolsPanel .dropdown3,
.fn-mkt #drawingToolsPanel .dropdown4 {
  display: inline-flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  float: none !important;
  margin: 0 !important;
  position: relative;
}
.fn-mkt #drawingToolsPanel .pull-left { float: none !important; }
.fn-mkt #drawingToolsPanel .hideButtons { display: inline-flex; }

/* Scripts toggle some of these buttons with an inline display:none (the
   add/remove-from-portfolio pair in market-watchlist.js); the forced
   inline-flex below must not bring them back. */
.fn-mkt #drawingToolsPanel.toolbar .btn,
.fn-mkt #drawingToolsPanel.toolbar a.btn,
.fn-mkt #drawingToolsPanel.toolbar .dropbtn,
.fn-mkt #drawingToolsPanel.toolbar button.dropdown-toggle,
.fn-mkt #drawingToolsPanel.toolbar .bootstrap-select > .dropdown-toggle,
.fn-mkt #drawingToolsPanel.toolbar .color-picker,
.fn-mkt #drawingToolsPanel.toolbar .leftBtns button,
.fn-mkt #drawingToolsPanel.toolbar .leftBtns .btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  flex: 0 0 auto !important;
  height: var(--fn-tool-h) !important;
  min-height: var(--fn-tool-h) !important;
  max-height: var(--fn-tool-h) !important;
  min-width: var(--fn-tool-h);
  margin: 0 !important;
  padding: 0 10px !important;
  border: 1px solid transparent !important;
  border-radius: var(--fn-radius-sm) !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-family: var(--fn-font-ui) !important;
  font-size: var(--fn-fs-sm) !important;
  font-weight: var(--fn-fw-medium) !important;
  line-height: 1 !important;
  color: var(--fn-text-1) !important;
  white-space: nowrap;
  filter: none !important;
  vertical-align: middle;
}
/* The show rule above outranks a plain [style*=display:none], so the hidden
   twin (add vs remove from the portfolio) was forced back on and the bar
   wrapped to a second row. This one wins. */
/* A narrow chart column (the card is beside it) still stays one row. */
.fn-mkt-stage__chart { container-type: inline-size; container-name: fnchart; }
@container fnchart (max-width: 760px) {
  .fn-mkt #drawingToolsPanel.toolbar .btn,
  .fn-mkt #drawingToolsPanel.toolbar a.btn,
  .fn-mkt #drawingToolsPanel.toolbar .dropbtn,
  .fn-mkt #drawingToolsPanel.toolbar button.dropdown-toggle,
  .fn-mkt #drawingToolsPanel.toolbar .bootstrap-select > .dropdown-toggle {
    padding: 0 4px !important;
  }
  .fn-mkt #drawingToolsPanel.toolbar > .btn-group,
  .fn-mkt #drawingToolsPanel.toolbar > .btn-group-container {
    padding: 0 2px !important;
  }
}
.fn-mkt #drawingToolsPanel.toolbar .btn[style*="display: none"],
.fn-mkt #drawingToolsPanel.toolbar .btn[style*="display:none"],
.fn-mkt #drawingToolsPanel.toolbar a.btn[style*="display: none"],
.fn-mkt #drawingToolsPanel.toolbar a.btn[style*="display:none"] {
  display: none !important;
}
.fn-mkt #drawingToolsPanel .btn:hover,
.fn-mkt #drawingToolsPanel .btn:focus-visible,
.fn-mkt #drawingToolsPanel .dropdown2:hover > .btn,
.fn-mkt #drawingToolsPanel .dropdown3:hover > .btn,
.fn-mkt #drawingToolsPanel .dropdown4:hover > .btn,
.fn-mkt #drawingToolsPanel .bootstrap-select > .dropdown-toggle:hover {
  background: var(--fn-bg-hover) !important;
  border-color: var(--fn-border-brand) !important;
  color: var(--fn-text-1) !important;
}
.fn-mkt #drawingToolsPanel .btn.active,
.fn-mkt #drawingToolsPanel .btn.showB {
  background: var(--fn-bg-active) !important;
  border-color: var(--fn-border-brand) !important;
  font-weight: var(--fn-fw-bold);
}
.fn-mkt #drawingToolsPanel .btn.disabled { opacity: 0.45; }
.fn-mkt #drawingToolsPanel .btn i,
.fn-mkt #drawingToolsPanel .btn span,
.fn-mkt #drawingToolsPanel .btn .ac { font-size: 14px !important; color: inherit !important; }
.fn-mkt #drawingToolsPanel .btn img { width: 15px; height: 15px; opacity: 0.8; }
:root[data-fn-theme="dark"] .fn-mkt #drawingToolsPanel .btn img { filter: invert(1); }
.fn-mkt #drawingToolsPanel .caret { border-top-color: var(--fn-text-3); margin: 0; }
.fn-mkt #drawingToolsPanel .color-fill-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid var(--fn-border-strong);
  border-radius: 3px;
}

/* "מחזורים" / "מחזורי מוסדיים" are checkboxes dressed as buttons. */
.fn-mkt #drawingToolsPanel .pdchshss {
  gap: 6px;
  cursor: pointer;
}
.fn-mkt #drawingToolsPanel .pdchshss input[type="checkbox"] {
  margin: 0 !important;
  accent-color: var(--fn-accent);
}

.fn-mkt #drawingToolsPanel .bootstrap-select,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

/* The gold skin (loaded after this file) pins the caret at right:8px and
   the label at width:100% inside a fixed 140px box, so the arrow sits on
   the first letters. The label and the arrow are flex items instead, with
   the arrow after the word. */
.fn-mkt #drawingToolsPanel .bootstrap-select > .dropdown-toggle,
.fn-mkt #drawingToolsPanel .indicatorSec button.dropdown-toggle,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select.open > .btn,
.fn-mkt #drawingToolsPanel .indicatorSec .open > .dropdown-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto !important;
  height: var(--fn-tool-h) !important;
  min-height: var(--fn-tool-h) !important;
  max-height: var(--fn-tool-h) !important;
  padding: 0 10px !important;
  overflow: visible;
  /* bootstrap-select inserts an &nbsp; between the label and the arrow. */
  font-size: 0 !important;
  line-height: 1 !important;
  text-align: right !important;
}
.fn-mkt #drawingToolsPanel .bootstrap-select .dropdown-toggle .filter-option,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-toggle .filter-option,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select.btn-group .dropdown-toggle .filter-option,
.fn-mkt #drawingToolsPanel .bootstrap-select.open .dropdown-toggle .filter-option {
  display: block !important;
  position: static !important;
  float: none !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  line-height: 1 !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  text-align: right !important;
  color: var(--fn-text-1) !important;
  font-family: var(--fn-font-ui) !important;
  font-size: var(--fn-fs-sm) !important;
  font-weight: var(--fn-fw-medium) !important;
}
.fn-mkt #drawingToolsPanel .bootstrap-select .dropdown-toggle .caret,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-toggle .caret,
.fn-mkt #drawingToolsPanel .bootstrap-select .dropdown-toggle .bs-caret,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-toggle .bs-caret,
.fn-mkt #drawingToolsPanel .color-picker .caret {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  float: none !important;
  margin: 0 !important;
  transform: none !important;
  z-index: auto !important;
  border-top-color: var(--fn-text-3) !important;
  flex: none;
}
.fn-mkt #drawingToolsPanel .bootstrap-select .dropdown-toggle .bs-caret,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-toggle .bs-caret {
  margin-inline-start: 6px !important;
}

/* Text menus (אופי גרף, סוג גרף, רקע, מרקר…) had no arrow at all, so the
   one select that did looked like a different control. Same mark, in the
   flow, after the label. */
/* One caret, on every menu trigger, including the select widget. The widget's
   own caret is hidden so a button never grows a second arrow. */
.fn-mkt #drawingToolsPanel.toolbar .dropdown > .btn::after,
.fn-mkt #drawingToolsPanel.toolbar .dropdown2 > .btn::after,
.fn-mkt #drawingToolsPanel.toolbar .dropdown3 > .btn::after,
.fn-mkt #drawingToolsPanel.toolbar .dropdown4 > .btn::after,
.fn-mkt #drawingToolsPanel.toolbar .dropbtn::after,
.fn-mkt #drawingToolsPanel.toolbar .bootstrap-select > .dropdown-toggle::after {
  content: "";
  width: 0;
  height: 0;
  margin-inline-start: 2px;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.55;
  flex: none;
}
.fn-mkt #drawingToolsPanel.toolbar .caret,
.fn-mkt #drawingToolsPanel.toolbar .bs-caret { display: none !important; }

/* Groups are one row of the same chips, with a hairline between groups. */
.fn-mkt #drawingToolsPanel.toolbar > .btn-group,
.fn-mkt #drawingToolsPanel.toolbar > .btn-group-container {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  min-height: var(--fn-tool-h);
  margin: 0 !important;
  padding: 0 4px !important;
}
.fn-mkt #drawingToolsPanel.toolbar > .btn-group + .btn-group,
.fn-mkt #drawingToolsPanel.toolbar > .btn-group + .btn-group-container,
.fn-mkt #drawingToolsPanel.toolbar > .btn-group-container + .btn-group,
.fn-mkt #drawingToolsPanel.toolbar > .btn-group-container + .btn-group-container {
  border-inline-start: 1px solid var(--fn-border);
  margin-inline-start: 2px !important;
  padding-inline-start: 6px !important;
}

/* Never wider than the chart it belongs to: one row that scrolls sideways.

   The bar is pinned to a single row, and on a phone its chips are about
   870px in a 340px column. With nothing to hold the overflow it ran half a
   screen off the inline end and the whole page scrolled sideways with it.

   The wrapper (.drawingtool) is the scroll box and the bar inside it is as
   wide as its chips. It is a plain scroll box on purpose: an earlier version
   kept the panels that open under the chips from being clipped by giving
   the box padding over the plot and pointer-events:none, and iOS will not
   touch-scroll a box that ignores the pointer.

   A scroll box clips everything that hangs out of it, so those panels are
   taken out of its reach instead: .fn-tool-pop (set by fn-markets-chart.js
   on each top-level panel and menu) pins them to the screen, and the same
   script places each one under its chip when it opens.

   The scrollbar is hidden; a cut-off chip at the edge is the cue. */
.fn-mkt .fn-mkt-chart > .drawingtool:not([hidden]),
.fn-mkt .fn-mkt-stage__chart > .drawingtool:not([hidden]) {
  display: block !important;
  /* !important: anychart-tools/css/style.css pins overflow:visible on the
     wrapper with it. */
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.fn-mkt .fn-mkt-chart > .drawingtool::-webkit-scrollbar,
.fn-mkt .fn-mkt-stage__chart > .drawingtool::-webkit-scrollbar { display: none; }

.fn-mkt .fn-mkt-chart > .drawingtool > #drawingToolsPanel.toolbar,
.fn-mkt .fn-mkt-stage__chart > .drawingtool > #drawingToolsPanel.toolbar {
  width: max-content !important;
  min-width: 100%;
  max-width: none;
}

/* Out of the scroll box's reach. Left and top are written by the script;
   until it has run the panel is parked off-screen rather than shown in
   the wrong place. */
.fn-mkt #drawingToolsPanel .fn-tool-pop {
  position: fixed !important;
  top: -9999px;
}
/* Bootstrap lays a full-screen backdrop under every menu on a touch-capable
   browser; the next tap on another chip then hit it and only closed the
   menu. Pressing outside the row is handled by fn-markets-chart.js. */
.fn-mkt #drawingToolsPanel .dropdown-backdrop { display: none !important; }
/* Desktop keeps a second "סוג גרף" plus the phone-only "עוד" button in their
   own group. Both are hidden, but the empty group still drew a divider, so
   "רקע" and "תיק אישי" had two lines between them. */
@media (min-width: 768px) {
  .fn-mkt #drawingToolsPanel.toolbar > .btn-group-container.mr15 {
    display: none !important;
  }
}

/* A control whose only content is an icon is a square. A label next to the
   icon (the portfolio button) keeps its own width, or the words spill onto
   the chip beside it. */
.fn-mkt #drawingToolsPanel.toolbar #resetButton,
.fn-mkt #drawingToolsPanel.toolbar .dropdown-content2 .btn:has(> i:only-child),
.fn-mkt #drawingToolsPanel.toolbar .dropdown-content3 .btn:has(> i:only-child),
.fn-mkt #drawingToolsPanel.toolbar .dropdown-content4 .btn:has(> i:only-child) {
  width: var(--fn-tool-h) !important;
  min-width: var(--fn-tool-h) !important;
  padding: 0 !important;
}
.fn-mkt #drawingToolsPanel.toolbar .btn i,
.fn-mkt #drawingToolsPanel.toolbar .btn .fa,
.fn-mkt #drawingToolsPanel.toolbar .btn .ac,
.fn-mkt #drawingToolsPanel.toolbar a.btn i {
  font-size: 15px !important;
  line-height: 1 !important;
  width: 15px;
  text-align: center;
  color: inherit !important;
}
.fn-mkt #drawingToolsPanel.toolbar .btn img {
  width: 15px !important;
  height: 15px !important;
  opacity: 0.85;
}
.fn-mkt #drawingToolsPanel.toolbar .btn i.fa-star { color: var(--fn-accent) !important; }

/* Hover panels. Opened by :hover in the page CSS; here they become one
   surface with the rest of the menus and open from the trigger's start edge. */
.fn-mkt #drawingToolsPanel .dropdown-content2,
.fn-mkt #drawingToolsPanel .dropdown-content3,
.fn-mkt #drawingToolsPanel .dropdown-content4 {
  top: 100%;
  right: 0;
  left: auto;
  width: max-content !important;
  max-width: min(320px, calc(100vw - 24px));
  margin-top: 0;
  padding: 6px;
  background: var(--fn-bg-raised) !important;
  border: 1px solid var(--fn-border-strong) !important;
  border-radius: var(--fn-radius-md) !important;
  box-shadow: var(--fn-shadow-pop) !important;
  direction: rtl !important;
  text-align: right;
  /* Above the floating accessibility launcher (--fn-z-overlay). */
  z-index: calc(var(--fn-z-overlay) + 1);
}
.fn-mkt #drawingToolsPanel .dropdown2:not(.is-dismissed):hover .dropdown-content2,
.fn-mkt #drawingToolsPanel .dropdown3:not(.is-dismissed):hover .dropdown-content3,
.fn-mkt #drawingToolsPanel .dropdown4:not(.is-dismissed):hover .dropdown-content4,
.fn-mkt #drawingToolsPanel .dropdown2:not(.is-dismissed):focus-within .dropdown-content2,
.fn-mkt #drawingToolsPanel .dropdown3:not(.is-dismissed):focus-within .dropdown-content3,
.fn-mkt #drawingToolsPanel .dropdown4:not(.is-dismissed):focus-within .dropdown-content4,
.fn-mkt #drawingToolsPanel .dropdown2.is-open .dropdown-content2,
.fn-mkt #drawingToolsPanel .dropdown3.is-open .dropdown-content3,
.fn-mkt #drawingToolsPanel .dropdown4.is-open .dropdown-content4 {
  display: flex !important;
  flex-wrap: wrap;
  gap: 4px;
}
/* Closed by a second click, Escape or a pick while the pointer or focus is
   still on the chip: the page's own :hover rules must not reopen it. */
.fn-mkt #drawingToolsPanel .dropdown2.is-dismissed .dropdown-content2,
.fn-mkt #drawingToolsPanel .dropdown3.is-dismissed .dropdown-content3,
.fn-mkt #drawingToolsPanel .dropdown4.is-dismissed .dropdown-content4,
/* The row has just appeared with this chip under a still pointer
   (fn-markets-chart.js): no hover-opening until the pointer has left it. */
.fn-mkt #drawingToolsPanel .dropdown2.is-hover-hold:not(.is-open):not(:focus-within) .dropdown-content2,
.fn-mkt #drawingToolsPanel .dropdown3.is-hover-hold:not(.is-open):not(:focus-within) .dropdown-content3,
.fn-mkt #drawingToolsPanel .dropdown4.is-hover-hold:not(.is-open):not(:focus-within) .dropdown-content4 {
  display: none !important;
}

/* The accessibility launcher folds into its docked tab (02-header.css)
   while it would sit on the chart toolbar row; fn-markets-chart.js sets it. */
.fn-ui .header #acc_box.is-tucked { left: 0; }
.fn-ui .header #acc_box.is-tucked .fn-a11y-hide { display: none; }
.fn-ui .header #acc_box.is-tucked .fn-a11y-launch {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border-left: 0;
  border-radius: 0 22px 22px 0;
  transform: none;
  box-shadow: 0 6px 18px -10px rgba(14, 20, 16, 0.4);
}
.fn-ui .header #acc_box.is-tucked .fn-a11y-launch:hover,
.fn-ui .header #acc_box.is-tucked .fn-a11y-launch:focus { transform: none; }
.fn-ui .header #acc_box.is-tucked .fn-a11y-launch__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
/* A transparent bridge so the panel does not close while the pointer
   crosses the gap between trigger and panel. */
.fn-mkt #drawingToolsPanel .dropdown-content2::before,
.fn-mkt #drawingToolsPanel .dropdown-content3::before,
.fn-mkt #drawingToolsPanel .dropdown-content4::before {
  content: "";
  position: absolute;
  inset: -8px 0 auto 0;
  height: 8px;
}
/* Up to 768px anychart-tools' style.css turns these panels into sheets
   pinned 12px from both screen edges. The max-content width above outranked
   its width:auto, so a panel with many buttons (markers) kept its full
   630px and ran off the side of a phone. As a sheet it takes the width the
   two edges give it and its buttons wrap inside. */
@media (max-width: 768px) {
  .fn-mkt #drawingToolsPanel .dropdown-content2,
  .fn-mkt #drawingToolsPanel .dropdown-content3,
  .fn-mkt #drawingToolsPanel .dropdown-content4 {
    width: auto !important;
    max-width: none;
  }
}
.fn-mkt #drawingToolsPanel .dropdown-content2 .btn,
.fn-mkt #drawingToolsPanel .dropdown-content3 .btn,
.fn-mkt #drawingToolsPanel .dropdown-content4 .btn {
  width: 32px;
  height: 32px !important;
  padding: 0 !important;
}
.fn-mkt #drawingToolsPanel .dropdown-content2 .btn.color-picker,
.fn-mkt #drawingToolsPanel .dropdown-content3 .btn.color-picker,
.fn-mkt #drawingToolsPanel .dropdown-content4 .btn.color-picker {
  width: auto;
  padding: 0 8px !important;
  gap: 4px;
}
.fn-mkt #drawingToolsPanel .dropdown-content2 a,
.fn-mkt #drawingToolsPanel .dropdown-content3 a,
.fn-mkt #drawingToolsPanel .dropdown-content4 a { color: var(--fn-text-1); padding: 7px 10px; }

/* Bootstrap menus inside the toolbar ("סוג גרף", "רקע"). The skin swatches
   in "רקע" keep their gradient but read as a row, not a coloured slab. */
.fn-mkt #drawingToolsPanel .themeSelect2 .dropdown-menu > li > a {
  margin: 2px 0;
  border: 1px solid var(--fn-border) !important;
  border-radius: var(--fn-radius-sm);
}

/* The gold skin (anychart-tools/css/style.css) paints menu items with
   #c5b737 !important on the inner <span class="text"> that bootstrap-select
   inserts. A direct-child "li > a" rule never reaches that span, which is
   why "אינדיקטורים" still opened as a gold list. These match that span. */
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-menu,
.fn-mkt #drawingToolsPanel .seriesTypeSelect2 .dropdown-menu,
.fn-mkt #drawingToolsPanel .themeSelect2 .dropdown-menu,
.fn-mkt #drawingToolsPanel .bootstrap-select .dropdown-menu,
.fn-mkt #drawingToolsPanel .dropdown .dropdown-menu {
  background: var(--fn-bg-raised) !important;
  border: 1px solid var(--fn-border-strong) !important;
  border-radius: var(--fn-radius-md) !important;
  box-shadow: var(--fn-shadow-pop) !important;
}
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-menu li a,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-menu li a span.text,
.fn-mkt #drawingToolsPanel .seriesTypeSelect2 .dropdown-menu > li > a,
.fn-mkt #drawingToolsPanel .dropdown .dropdown-menu > li > a,
.fn-mkt #drawingToolsPanel .bootstrap-select .dropdown-menu li a,
.fn-mkt #drawingToolsPanel .bootstrap-select .dropdown-menu li a span.text {
  color: var(--fn-text-1) !important;
  font-weight: var(--fn-fw-regular) !important;
  text-shadow: none !important;
}
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-menu li a:hover,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-menu li a:hover span.text,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-menu li.active a,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-menu li.active a span.text,
.fn-mkt #drawingToolsPanel .seriesTypeSelect2 .dropdown-menu > li > a:hover,
.fn-mkt #drawingToolsPanel .dropdown .dropdown-menu > li > a:hover,
.fn-mkt #drawingToolsPanel .bootstrap-select .dropdown-menu li a:hover,
.fn-mkt #drawingToolsPanel .bootstrap-select .dropdown-menu li a:hover span.text,
.fn-mkt #drawingToolsPanel .bootstrap-select .dropdown-menu li.active a,
.fn-mkt #drawingToolsPanel .bootstrap-select .dropdown-menu li.active a span.text {
  background: var(--fn-bg-hover) !important;
  color: var(--fn-text-1) !important;
}
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-menu li.selected a,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-menu li.selected a span.text,
.fn-mkt #drawingToolsPanel .bootstrap-select .dropdown-menu li.selected a,
.fn-mkt #drawingToolsPanel .bootstrap-select .dropdown-menu li.selected a span.text {
  background: var(--fn-brand-soft) !important;
  color: var(--fn-brand) !important;
}
.fn-mkt #drawingToolsPanel .dropdown-menu .check-mark { color: var(--fn-accent) !important; }

/* Open state of the select, and the icon glyphs, were a second gold pass
   (#e0d06a) that outranked the closed-button rule. */
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select.open > .dropdown-toggle,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select.open > .btn,
.fn-mkt #drawingToolsPanel .bootstrap-select.open > .dropdown-toggle,
.fn-mkt #drawingToolsPanel .bootstrap-select.open > .btn {
  color: var(--fn-text-1) !important;
  background: var(--fn-bg-hover) !important;
  background-image: none !important;
  border-color: var(--fn-border-brand) !important;
}
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-toggle .filter-option,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select.open .dropdown-toggle .filter-option,
.fn-mkt #drawingToolsPanel .bootstrap-select.open .dropdown-toggle .filter-option {
  color: var(--fn-text-1) !important;
}
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-toggle .caret,
.fn-mkt #drawingToolsPanel .indicatorSec .bootstrap-select .dropdown-toggle .bs-caret {
  border-top-color: var(--fn-text-3) !important;
}
.fn-mkt #drawingToolsPanel .btn i,
.fn-mkt #drawingToolsPanel .btn:hover i,
.fn-mkt #drawingToolsPanel .btn.active i,
.fn-mkt #drawingToolsPanel .leftBtns button i,
.fn-mkt #drawingToolsPanel .leftBtns button:hover i {
  color: inherit !important;
}

/* Open menus. style.css paints these gold-on-navy with an id selector and
   !important, and it loads from the page head. The extra classes here are
   what outrank that file: one surface, one row height, text on the start
   edge. Theme swatches keep the gradient written on the link. */
.fn-mkt .fn-mkt-stage__chart .chart-range-bar .intervalSelect .dropdown-menu,
.fn-mkt #drawingToolsPanel.toolbar .dropdown > .dropdown-menu,
.fn-mkt #drawingToolsPanel.toolbar .seriesTypeSelect2 .dropdown-menu,
.fn-mkt #drawingToolsPanel.toolbar .themeSelect2 .dropdown-menu,
.fn-mkt #drawingToolsPanel.toolbar .bootstrap-select > .dropdown-menu {
  min-width: 168px !important;
  max-height: min(60vh, 420px) !important;
  margin-top: 6px !important;
  padding: 6px !important;
  background: var(--fn-bg-raised) !important;
  border: 1px solid var(--fn-border-strong) !important;
  border-radius: var(--fn-radius-md) !important;
  box-shadow: var(--fn-shadow-pop) !important;
  direction: rtl !important;
  text-align: right !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  z-index: calc(var(--fn-z-overlay) + 1) !important;
}

.fn-mkt .fn-mkt-stage__chart .chart-range-bar .intervalSelect .dropdown-menu > li > a,
.fn-mkt #drawingToolsPanel.toolbar .dropdown:not(.themeSelect2) > .dropdown-menu > li > a,
.fn-mkt #drawingToolsPanel.toolbar .seriesTypeSelect2 .dropdown-menu > li > a {
  display: block !important;
  margin: 1px 0 !important;
  padding: 8px 12px !important;
  border: 0 !important;
  border-radius: var(--fn-radius-sm) !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--fn-text-1) !important;
  font-family: var(--fn-font-ui) !important;
  font-size: var(--fn-fs-sm) !important;
  font-weight: var(--fn-fw-medium) !important;
  line-height: 1.35 !important;
  text-align: right !important;
  text-shadow: none !important;
  white-space: nowrap !important;
}

.fn-mkt .fn-mkt-stage__chart .chart-range-bar .intervalSelect .dropdown-menu > li > a:hover,
.fn-mkt .fn-mkt-stage__chart .chart-range-bar .intervalSelect .dropdown-menu > li > a:focus,
.fn-mkt #drawingToolsPanel.toolbar .dropdown:not(.themeSelect2) > .dropdown-menu > li > a:hover,
.fn-mkt #drawingToolsPanel.toolbar .dropdown:not(.themeSelect2) > .dropdown-menu > li > a:focus,
.fn-mkt #drawingToolsPanel.toolbar .seriesTypeSelect2 .dropdown-menu > li > a:hover,
.fn-mkt #drawingToolsPanel.toolbar .seriesTypeSelect2 .dropdown-menu > li > a:focus {
  background: var(--fn-bg-hover) !important;
  color: var(--fn-text-1) !important;
}

/* Indicator names are English. This bootstrap-select builds
   div.dropdown-menu > ul.dropdown-menu.inner, and the ul is the scroller.
   An earlier rule set that ul to overflow:visible, so the outer box clipped
   the list and the bar disappeared. ltr keeps the bar on the right. */
.fn-mkt #drawingToolsPanel.toolbar .indicatorSec .bootstrap-select > .dropdown-menu {
  width: max-content !important;
  min-width: 280px !important;
  max-width: min(420px, calc(100vw - 32px)) !important;
  max-height: none !important;
  padding: 8px !important;
  direction: ltr !important;
  text-align: left !important;
  background: var(--fn-bg-raised) !important;
  border: 1px solid var(--fn-border-strong) !important;
  border-radius: var(--fn-radius-md) !important;
  box-shadow: var(--fn-shadow-pop) !important;
  overflow: hidden !important;
}
.fn-mkt #drawingToolsPanel.toolbar .bootstrap-select > .dropdown-menu > .inner {
  direction: ltr !important;
  max-height: min(52vh, 360px) !important;
  margin: 0 !important;
  padding: 0 4px 0 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: var(--fn-border-strong) transparent;
  background: transparent !important;
}
.fn-mkt #drawingToolsPanel.toolbar .bootstrap-select > .dropdown-menu > .inner::-webkit-scrollbar {
  width: 8px;
}
.fn-mkt #drawingToolsPanel.toolbar .bootstrap-select > .dropdown-menu > .inner::-webkit-scrollbar-track {
  background: transparent;
}
.fn-mkt #drawingToolsPanel.toolbar .bootstrap-select > .dropdown-menu > .inner::-webkit-scrollbar-thumb {
  background: var(--fn-border-strong);
  border-radius: 8px;
}
.fn-mkt #drawingToolsPanel.toolbar .indicatorSec .bootstrap-select .dropdown-menu.inner {
  position: static !important;
  display: block !important;
  float: none !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  direction: ltr !important;
  text-align: left !important;
}
.fn-mkt #drawingToolsPanel.toolbar .indicatorSec .bootstrap-select .dropdown-menu li a {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 34px !important;
  margin: 2px 0 !important;
  padding: 6px 10px !important;
  border-radius: var(--fn-radius-sm) !important;
  background: transparent !important;
  direction: ltr !important;
  text-align: left !important;
}
.fn-mkt #drawingToolsPanel.toolbar .indicatorSec .bootstrap-select .dropdown-menu li a span.text {
  display: block !important;
  flex: 1 1 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--fn-text-1) !important;
  font-family: var(--fn-font-ui) !important;
  font-size: var(--fn-fs-sm) !important;
  font-weight: var(--fn-fw-medium) !important;
  line-height: 1.35 !important;
  text-align: left !important;
  direction: ltr !important;
  text-shadow: none !important;
  white-space: nowrap !important;
}
.fn-mkt #drawingToolsPanel.toolbar .indicatorSec .bootstrap-select .dropdown-menu li a span.check-mark {
  position: static !important;
  right: auto !important;
  margin: 0 !important;
  color: var(--fn-brand) !important;
  font-size: 12px !important;
}
.fn-mkt #drawingToolsPanel.toolbar .indicatorSec .bootstrap-select .dropdown-menu li a:hover,
.fn-mkt #drawingToolsPanel.toolbar .indicatorSec .bootstrap-select .dropdown-menu li a:hover span.text,
.fn-mkt #drawingToolsPanel.toolbar .indicatorSec .bootstrap-select .dropdown-menu li.active a,
.fn-mkt #drawingToolsPanel.toolbar .indicatorSec .bootstrap-select .dropdown-menu li.active a span.text {
  background: var(--fn-bg-hover) !important;
  color: var(--fn-text-1) !important;
}
.fn-mkt #drawingToolsPanel.toolbar .indicatorSec .bootstrap-select .dropdown-menu li.selected a,
.fn-mkt #drawingToolsPanel.toolbar .indicatorSec .bootstrap-select .dropdown-menu li.selected a span.text {
  background: var(--fn-brand-soft) !important;
  color: var(--fn-brand) !important;
}

/* Background themes stay swatches: the gradient is an inline style, and a
   dark swatch carries its own white ink. */
.fn-mkt #drawingToolsPanel.toolbar .themeSelect2 .dropdown-menu {
  min-width: 196px !important;
}
.fn-mkt #drawingToolsPanel.toolbar .themeSelect2 .dropdown-menu > li > a {
  display: block !important;
  margin: 3px 0 !important;
  padding: 7px 12px !important;
  border: 1px solid var(--fn-border) !important;
  border-radius: var(--fn-radius-sm) !important;
  color: var(--fn-text-1) !important;
  font-size: var(--fn-fs-sm) !important;
  font-weight: var(--fn-fw-medium) !important;
  text-align: right !important;
  text-shadow: none !important;
}
.fn-mkt #drawingToolsPanel.toolbar .themeSelect2 .dropdown-menu > li > a[style*="color"] {
  color: #fff !important;
}
.fn-mkt #drawingToolsPanel.toolbar .themeSelect2 .dropdown-menu > li > a:hover {
  filter: brightness(0.97);
}

/* --------------------------------------------------------------------------
   LEGACY CHART PAGES — madad, madadf, madadof, sec, secN, forex, forexo, fundo

   These still carry the original block: drawing toolbar, portfolio button,
   title + last quote, gold range links, chart, as Bootstrap columns in one
   .row. The row becomes a grid so the order follows Udi's rule (what moves -
   name, price, change - first; tools after) without touching eight markups.

   anychart-tools/css/style.css styles the range bar with
   "#content .chart-range-bar … !important"; the :not(#fn) below adds the id
   weight needed to outrank it.
   -------------------------------------------------------------------------- */
.fn-mkt .padNone > .row:has(> .drawingtool) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: var(--fn-space-4);
  margin: 0;
}
.fn-mkt .padNone > .row:has(> .drawingtool)::before,
.fn-mkt .padNone > .row:has(> .drawingtool)::after { display: none; }
.fn-mkt .padNone > .row:has(> .drawingtool) > * {
  grid-column: 1 / -1;
  float: none;
  width: auto;
  min-width: 0;
  padding-inline: 0;
}
.fn-mkt .padNone > .row:has(> .drawingtool) > .mr14t,
.fn-mkt .padNone > .row:has(> .drawingtool) > div:has(> .chartTopTitle) { grid-row: 1; grid-column: 1; }
.fn-mkt .padNone > .row:has(> .drawingtool) > div:has(> .fn-mkt-quote) { grid-row: 1; grid-column: 1 / -1; }
.fn-mkt .padNone > .row:has(> .drawingtool) > .portBtn { grid-row: 1; grid-column: 2; }
.fn-mkt .padNone > .row:has(> .drawingtool) > .chart-range-bar-wrap { grid-row: 2; }
.fn-mkt .padNone > .row:has(> .drawingtool) > .drawingtool { grid-row: 3; }
.fn-mkt .padNone > .row:has(> .drawingtool) > .padNone:has(#chart-container) { grid-row: 4; }

/* Title + last quote: price and change lead, the timestamp trails. */
.fn-mkt .mr14t {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--fn-space-3);
  margin: 0 !important;
  padding: 0 !important;
  text-align: right !important;
}
.fn-mkt .chartTopTitle {
  flex: 1 0 100%;
  order: -3;
  width: auto;
  margin: var(--fn-space-2) 0 2px !important;
  font-family: var(--fn-mkt-font-head);
  font-size: 24px !important;
  line-height: 1.2;
  text-align: right !important;
  color: var(--fn-text-1) !important;
}
.fn-mkt .chartTopTitle strong { font-weight: var(--fn-fw-bold); color: inherit; }
.fn-mkt .mr14t .lastChartDatas { font-size: var(--fn-fs-sm) !important; color: var(--fn-text-3); }
.fn-mkt .mr14t #lastCPrice {
  order: -2;
  font-family: var(--fn-mkt-font-num);
  font-size: 30px !important;
  font-weight: var(--fn-fw-bold);
  line-height: 1.1;
  color: var(--fn-text-1);
  direction: ltr;
}
.fn-mkt .mr14t #lastCChange {
  order: -1;
  font-family: var(--fn-mkt-font-num);
  font-size: var(--fn-fs-md, 16px) !important;
  font-weight: var(--fn-fw-bold);
  direction: ltr;
}
/* Portfolio button, beside the title instead of a row of its own. On phones
   the legacy .hideButtons would hide it behind "עוד"; it stays visible. */
.fn-mkt .portBtn {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}
.fn-mkt .portBtn .hideButtons,
.fn-mkt .portBtn > div {
  display: flex !important;
  align-items: center;
  gap: var(--fn-space-2);
}
.fn-mkt .portBtn .btn:not(#fn) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 1px solid var(--fn-field-border) !important;
  border-radius: var(--fn-radius-pill) !important;
  background: var(--fn-field-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-size: var(--fn-fs-sm) !important;
  font-weight: var(--fn-fw-medium);
  color: var(--fn-text-1) !important;
}
.fn-mkt .portBtn .btn:not(#fn):hover { border-color: var(--fn-border-brand) !important; background: var(--fn-bg-hover) !important; }
.fn-mkt .portBtn .btn .fa-star { color: var(--fn-accent); }
.fn-mkt .portBtn #portMsg { font-size: var(--fn-fs-sm); color: var(--fn-text-2); }

/* Range links + interval menu, as seco's segmented tabs. */
.fn-mkt .chart-range-bar-wrap {
  justify-content: flex-start !important;
  margin: var(--fn-space-3) 0 var(--fn-space-2) !important;
  padding: 0 !important;
}
.fn-mkt .chart-range-bar {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  gap: var(--fn-space-2) !important;
  max-width: 100%;
  margin: 0 !important;
  overflow: visible !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
.fn-mkt .chart-range-bar > .btn-group-container:first-child {
  display: flex !important;
  flex: 0 1 auto;
  flex-wrap: nowrap !important;
  min-width: 0;
  gap: 2px !important;
  padding: 3px !important;
  background: var(--fn-bg-sunken);
  border-radius: var(--fn-radius-pill);
  overflow-x: auto;
  scrollbar-width: none;
  /* Same order as .fn-mkt-ranges: short period on the right. */
  direction: rtl;
}
.fn-mkt .chart-range-bar > .btn-group-container:first-child::-webkit-scrollbar { display: none; }
.fn-mkt .chart-range-bar .btn:not(#fn) {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 11px !important;
  border: 0 !important;
  border-radius: var(--fn-radius-pill) !important;
  background: transparent !important;
  font-family: var(--fn-mkt-font-head) !important;
  font-size: var(--fn-fs-sm) !important;
  font-weight: var(--fn-fw-medium) !important;
  color: var(--fn-text-2) !important;
}
.fn-mkt .chart-range-bar .btn:not(#fn):hover { background: var(--fn-bg-hover) !important; color: var(--fn-text-1) !important; }
.fn-mkt .chart-range-bar a.btnSel:not(#fn),
.fn-mkt .chart-range-bar .btn.btnSel:not(#fn) {
  background: var(--fn-accent) !important;
  color: var(--fn-on-accent) !important;
  font-weight: var(--fn-fw-bold) !important;
}
.fn-mkt .chart-range-bar #intervalSelect:not(#fn) {
  border: 1px solid var(--fn-field-border) !important;
  background: var(--fn-field-bg) !important;
  color: var(--fn-text-1) !important;
}
.fn-mkt .chart-range-bar .intervalSelect .dropdown-menu {
  left: 0;
  right: auto;
  background: var(--fn-bg-raised);
  border: 1px solid var(--fn-border-strong);
  border-radius: var(--fn-radius-md);
  box-shadow: var(--fn-shadow-pop);
}
.fn-mkt .chart-range-bar .intervalSelect .dropdown-menu > li > a { color: var(--fn-text-1) !important; }
.fn-mkt .chart-range-bar .intervalSelect .dropdown-menu > li > a:hover { background: var(--fn-bg-hover); }
.fn-mkt .chart-range-bar-wrap .range-scroll-hint { display: none !important; }

@media (max-width: 600px) {
  .fn-mkt .padNone > .row:has(> .drawingtool) { grid-template-columns: minmax(0, 1fr) auto; }
  .fn-mkt .chartTopTitle { font-size: 20px !important; }
  .fn-mkt .mr14t #lastCPrice { font-size: 26px !important; }
  .fn-mkt .portBtn { align-self: start; padding-top: var(--fn-space-2) !important; }
  .fn-mkt .chart-range-bar > .btn-group-container:first-child { flex: 1 1 auto; }
}

/* "עוד" only exists to reveal the hidden tools on phones. anychart-tools'
   style.css paints it with an id+id selector, hence the doubled id here. */
.fn-mkt #drawingToolsPanel #showMoreButtons { display: none !important; }
.fn-mkt #drawingToolsPanel #showMoreButtons,
.fn-mkt #drawingToolsPanel .bootstrap-select > .btn,
.fn-mkt #drawingToolsPanel .indicatorSec button.dropdown-toggle {
  border: 0 !important;
  border-radius: var(--fn-radius-pill) !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--fn-text-1) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
.fn-mkt #drawingToolsPanel #showMoreButtons.showB {
  background: var(--fn-bg-active) !important;
  border-color: var(--fn-border-brand) !important;
  color: var(--fn-text-1) !important;
}
.fn-mkt #drawingToolsPanel .bootstrap-select .dropdown-toggle .caret { border-top-color: var(--fn-text-3) !important; }

@media (max-width: 450px) {
  .fn-mkt #drawingToolsPanel .hideButtons { display: none !important; }
  .fn-mkt #drawingToolsPanel .btn { height: 30px !important; padding: 0 8px !important; }
  .fn-mkt #drawingToolsPanel #showMoreButtons { display: inline-flex !important; }
}

/* The toolbar carries a phone copy (.hidden-lg) and a desktop copy
   (.hidden-xs) of "סוג גרף". Split them at one breakpoint so a tablet does
   not show both. */
@media (max-width: 767px) { .fn-mkt #drawingToolsPanel .hidden-xs { display: none !important; } }
@media (min-width: 768px) {
  .fn-mkt #drawingToolsPanel .hidden-lg,
  .fn-mkt #drawingToolsPanel .visible-xs { display: none !important; }
}

/* AnyChart's from/to date inputs under the plot. */
.fn-mkt .fn-mkt-chart .anychart-range-picker .anychart-input-label { color: var(--fn-text-3) !important; }
.fn-mkt .fn-mkt-chart .anychart-range-picker .anychart-label-input,
.fn-mkt .fn-mkt-chart .anychart-range-picker input[type="text"] {
  height: 26px !important;
  color: var(--fn-text-2) !important;
  background: var(--fn-field-bg) !important;
  border: 1px solid var(--fn-field-border) !important;
  border-radius: var(--fn-radius-sm) !important;
  font-family: var(--fn-font-num, inherit) !important;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.fn-mkt .fn-mkt-chart .anychart-range-picker input[type="text"]:focus {
  color: var(--fn-text-1) !important;
  border-color: var(--fn-border-brand) !important;
  background: var(--fn-field-bg) !important;
}

/* --- bootstrap-select trigger (chart toolbar) --- */
.fn-mkt .bootstrap-select > .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 32px;
  height: 32px !important;
  padding: 0 var(--fn-space-2);
  border: 1px solid var(--fn-field-border);
  border-radius: var(--fn-radius-sm);
  background: var(--fn-field-bg) !important;
  background-image: none !important;
  box-shadow: none;
  font-family: var(--fn-font-ui);
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-regular);
  color: var(--fn-field-text) !important;
  text-shadow: none;
  white-space: nowrap;
}
.fn-mkt .bootstrap-select > .dropdown-toggle:hover,
.fn-mkt .bootstrap-select > .dropdown-toggle:focus-visible {
  border-color: var(--fn-border-brand);
  background: var(--fn-field-bg-hover) !important;
}
.fn-mkt .bootstrap-select > .dropdown-toggle .filter-option {
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  color: var(--fn-field-text) !important;
}
/* One arrow, on the correct side, aligned to the text baseline. */
.fn-mkt .bootstrap-select > .dropdown-toggle .caret {
  position: static;
  margin: 0;
  border-top-color: var(--fn-text-3);
  flex: 0 0 auto;
}

/* --- native selects --- */
.fn-mkt select,
.fn-mkt select.form-control {
  min-height: 32px;
  padding: 0 26px 0 var(--fn-space-2);
  border: 1px solid var(--fn-field-border);
  border-radius: var(--fn-radius-sm);
  background-color: var(--fn-field-bg);
  /* Chevron drawn inline so there is no sprite to 404 and it recolours with
     the theme. Sits on the start (right) side in RTL. */
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 10px center, right 5px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  font-family: var(--fn-font-ui);
  font-size: var(--fn-fs-sm);
  color: var(--fn-field-text);
  text-align: right;
  direction: rtl;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.fn-mkt select:hover { border-color: var(--fn-border-brand); }
/* The popup list itself is OS-drawn; colour-scheme is the only hook that
   makes it dark, and without it a dark page opens a white native list. */
.fn-mkt select { color-scheme: light; }
:root[data-fn-theme="dark"] .fn-mkt select { color-scheme: dark; }
/* !important: the category options still arrive with inline red/blue/white
   text from older code-behind builds. */
.fn-mkt select option {
  background: var(--fn-bg-raised) !important;
  color: var(--fn-text-1) !important;
  font-weight: var(--fn-fw-regular);
}
.fn-mkt select option[data-level="1"] { font-weight: var(--fn-fw-bold); }
.fn-mkt select option[data-level="3"] { color: var(--fn-text-2) !important; }


.fn-mkt-chart__plot {
  position: relative;
  direction: ltr;
  /* AnyChart lays out its SVG a little wider than the box it is given and
     relies on the container to clip. The old card wrapper did that with its
     own overflow:hidden; now that the card is gone the plot has to do it, or
     the spill reaches the document and gives mobile a horizontal scrollbar. */
  overflow: hidden;
  min-height: 260px;
  /* A clean rectangle. Udi asked for the plot to be "מרובע" with nothing
     appended beneath it; with the volume pane off (ternoChart=0) the plot is
     now a single unbroken rectangle rather than a stepped shape. The ratio
     follows the Yahoo reference, which is wide and low - roughly 2.6:1 on a
     phone - not a literal square. */
  height: clamp(260px, 42vh, 460px);
}

.fn-mkt-chart__plot > * { max-width: 100%; }

/* The chart scripts size #chart-container from the window height on every
   resize (initHeightChart), and some pages pin it at 540-660px. Inside the
   plot box the box decides; otherwise the time axis is cut off below the
   fold of the box. */
.fn-mkt .anychart-credits { display: none !important; }

.fn-mkt .fn-mkt-chart__plot > #chart-container {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

/* AnyChart ships its own range selector and renders it into
   #rangeselectorContainer: a row of light pills reading "עשר שנים / חמש שנים
   / שלוש שנים / שנה / חצי שנה / שלושה חודשים…".

   With the FN range selector above the plot that is a SECOND date picker for
   the same chart — precisely the "שכבות כפולות ומיותרות של בחירת תאריך" Udi
   asked us to get rid of. It also arrived unthemed (white pills on the dark
   page) and overflowed the viewport on mobile.

   The element stays in the DOM because sec.js/indexChartO.js address it
   during setup; it is only removed from the layout. */
.fn-mkt #rangeselectorContainer,
.fn-mkt .anychart-range-selector,
.fn-mkt .chart-range-selector-host {
  display: none !important;
}

/* Legend swatch for a comparison series. */
.fn-mkt-chart__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fn-space-3);
  padding: var(--fn-space-2) var(--fn-space-3);
  border-top: 1px solid var(--fn-border);
  font-size: var(--fn-fs-xs);
  color: var(--fn-text-2);
}

.fn-mkt-chart__swatch {
  display: inline-block;
  width: 10px;
  height: 2px;
  margin-inline-end: 5px;
  vertical-align: middle;
  background: currentColor;
}

@media (max-width: 767px) {
  .fn-mkt-chart__plot { height: clamp(220px, 38vh, 300px); }
  .fn-mkt-chart__bar { padding: var(--fn-space-2); }
}


/* ==========================================================================
   8b. QUOTE STAGE — chart on the left, key figures on the right
   --------------------------------------------------------------------------
   The classic quote layout (Yahoo Finance, הבורסה): the plot takes the wide
   column, a narrow card beside it holds today's session and the identity
   fields the stock table already has. The page is RTL, so the first grid
   track is the right-hand card and the second track is the chart.
   ========================================================================== */

.fn-mkt-stage {
  display: grid;
  grid-template-columns: minmax(272px, 320px) minmax(0, 1fr);
  gap: 8px 28px;
  align-items: stretch;
  direction: rtl;
  margin: 0 0 var(--fn-space-4);
}

/* A chart page with no side card (a fund): same stage, one column. */
.fn-mkt-stage--solo { grid-template-columns: minmax(0, 1fr); }

.fn-mkt-stage__chart {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

/* Range row and the drawing toolbar belong to the chart, not to the page.
   They fill the chart column and start at its inline edge, so they sit
   directly above the plot and never run across the figures card. */
.fn-mkt-stage__chart > .chart-range-bar-wrap,
.fn-mkt-stage__chart > .drawingtool {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}
.fn-mkt-stage__chart .chart-range-bar {
  width: 100%;
  justify-content: flex-start !important;
}
.fn-mkt-stage__chart .chart-range-bar > .btn-group-container:first-child {
  flex: 1 1 auto;
  justify-content: safe center;
}
.fn-mkt .fn-mkt-stage__chart #drawingToolsPanel.toolbar {
  width: 100% !important;
  max-width: 100%;
  margin-inline: 0 !important;
  justify-content: flex-start !important;
  border-radius: var(--fn-radius-md) !important;
}

/* Stock pages: only the period rail sits under the plot. The icon tools and
   the drawing toolbar they open stay above it, where they were.

   The bar is display:contents (the base rule), so its two children take
   their own places in the chart column: tools first, rail last. */
.fn-mkt-stage .fn-mkt-chart__bar { padding: 0; }
/* The two icon buttons do not get a row of their own - that pushed the plot
   down by 40px for nothing while the toolbar is closed. The row is zero
   height and the buttons hang out of it onto the plot's top corner. That
   corner is the inline-start (right) one: the plot is LTR and AnyChart puts
   its legend at the top left, so the right corner is free. */
.fn-mkt-stage .fn-mkt-chart__tools {
  order: 0;
  align-self: flex-start;
  position: relative;
  z-index: 3;
  height: 0;
  margin: 0;
  overflow: visible;
  align-items: flex-start;
}
.fn-mkt-stage .fn-mkt-chart__tools > * { margin-top: 2px; }
.fn-mkt-stage .fn-mkt-chart__tools .fn-mkt-iconbtn {
  background: var(--fn-bg-canvas);
}
.fn-mkt-stage .fn-mkt-chart__tools .fn-mkt-iconbtn:hover,
.fn-mkt-stage .fn-mkt-chart__tools .fn-mkt-iconbtn:focus-visible,
.fn-mkt-stage .fn-mkt-chart__tools .fn-mkt-iconbtn[aria-expanded="true"] {
  background: var(--fn-bg-hover);
}
/* The menu opens from the right edge of the chart, so it grows leftwards. */
.fn-mkt .fn-mkt-stage .fn-mkt-chart__tools .dropdown-menu { right: 0; left: auto; }

/* Always before the icon row, whichever comes first in the markup. */
.fn-mkt-stage .fn-mkt-chart > .drawingtool {
  order: -1;
  justify-content: stretch;
  margin: 0 0 8px !important;
}
.fn-mkt-stage .fn-mkt-ranges {
  order: 2;
  align-self: center;
  width: max-content;
  max-width: 100%;
  margin-top: 10px;
}

.fn-mkt-stage .fn-mkt-chart {
  flex: 1 1 auto;
  min-height: 340px;
  margin-bottom: 0;
  scroll-margin-top: 96px;
}

/* The plot fills the column once the card has set the row height, so the
   chart and the figures end on the same line. min-height keeps a short card
   (a paper with almost no history) from collapsing the plot. */
.fn-mkt-stage .fn-mkt-chart__plot {
  flex: 1 1 auto;
  height: auto;
  min-height: 320px;
}

.fn-mkt-key {
  min-width: 0;
  padding: 12px;
  background: var(--fn-bg-surface);
  border: 1px solid var(--fn-border-strong);
  border-radius: var(--fn-radius-md);
  box-shadow: var(--fn-shadow-sm);
}

/* Title, paper type and the session line share one block, so they stay
   readable on the patterned canvas instead of sitting on it directly. */
.fn-mkt-key__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fn-space-2);
  margin: 0;
  padding: 8px 10px 2px;
  background: var(--fn-bg-sunken);
  border: 1px solid var(--fn-border);
  border-bottom: 0;
  border-radius: var(--fn-radius-md) var(--fn-radius-md) 0 0;
}

.fn-mkt-key__title {
  margin: 0;
  font-family: var(--fn-mkt-font-head);
  font-size: var(--fn-fs-base);
  font-weight: var(--fn-fw-bold);
  line-height: 1.3;
  color: var(--fn-text-1);
}

.fn-mkt-key__badge {
  max-width: 58%;
  padding: 2px 8px;
  border-radius: var(--fn-radius-pill);
  background: var(--fn-brand-soft);
  border: 1px solid var(--fn-border-brand);
  font-size: 11px;
  font-weight: var(--fn-fw-bold);
  line-height: 1.4;
  color: var(--fn-brand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fn-mkt-key__note {
  margin: 0 0 12px;
  padding: 2px 10px 8px;
  background: var(--fn-bg-sunken);
  border: 1px solid var(--fn-border);
  border-top: 0;
  border-radius: 0 0 var(--fn-radius-md) var(--fn-radius-md);
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-medium);
  line-height: 1.4;
  color: var(--fn-text-2);
}
.fn-mkt-key__note:empty { display: none; }
.fn-mkt-key__head:has(+ .fn-mkt-key__note:empty) {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-md);
}

.fn-mkt-key__label {
  margin: 0;
  font-size: var(--fn-fs-xs);
  line-height: 1.3;
  color: var(--fn-text-3);
}

[data-fn-keystats] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fn-mkt-quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0;
  background: var(--fn-border);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-md);
  overflow: hidden;
}

.fn-mkt-quad__cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  background: var(--fn-bg-surface);
}

.fn-mkt-quad__label {
  font-size: var(--fn-fs-xs);
  line-height: 1.3;
  color: var(--fn-text-3);
}

.fn-mkt-quad__value {
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  font-size: var(--fn-fs-md);
  font-weight: var(--fn-fw-bold);
  line-height: 1.2;
  color: var(--fn-text-1);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
}
.fn-mkt-quad__value.fn-mkt-rtl { direction: rtl; text-align: right; }
.fn-mkt-quad__value.fn-mkt-stat__value--na { font-weight: var(--fn-fw-regular); }

.fn-mkt-key__rets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
}

.fn-mkt-key__ret {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 6px 2px;
  background: var(--fn-bg-sunken);
  border-radius: var(--fn-radius-sm);
  text-align: center;
}

.fn-mkt-key__ret span {
  font-size: 11px;
  line-height: 1.2;
  color: var(--fn-text-3);
  white-space: nowrap;
}

.fn-mkt-key__ret b {
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: var(--fn-fw-bold);
  line-height: 1.2;
  direction: ltr;
  unicode-bidi: isolate;
}

.fn-mkt-key__about {
  margin-top: 12px;
  padding: 10px 10px 2px;
  background: var(--fn-bg-sunken);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-md);
}

.fn-mkt-key__sub {
  margin: 0 0 4px;
  font-family: var(--fn-mkt-font-head);
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-bold);
  line-height: 1.3;
  color: var(--fn-text-1);
}

.fn-mkt-key .fn-mkt-stat__label {
  color: var(--fn-text-1);
  font-weight: var(--fn-fw-medium);
}

.fn-mkt-key .fn-mkt-stats {
  grid-template-columns: minmax(0, 1fr);
  border-top: 0;
  column-gap: 0;
}

@media (max-width: 991px) {
  .fn-mkt-stage { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .fn-mkt-stage__chart { order: -1; }
  .fn-mkt-key { padding: 12px; }
}

@media (max-width: 767px) {
  .fn-mkt-stage .fn-mkt-chart__plot {
    height: clamp(220px, 38vh, 300px);
    min-height: 220px;
  }
}

/* No side card to set the height: the plot keeps its own, as it had before it
   joined the stage. */
@media (min-width: 768px) {
  .fn-mkt-stage--solo .fn-mkt-chart__plot { flex: 0 0 auto; height: clamp(260px, 42vh, 460px); min-height: 260px; }
}


/* ==========================================================================
   9. SMART TABLE
   --------------------------------------------------------------------------
   Desktop presentation for security lists and index constituents.
   Readability over density: 13px floor, aligned numerals, sticky header,
   restrained zebra, and a hover that does not repaint the whole row.
   ========================================================================== */

.fn-mkt-tablewrap {
  position: relative;
  background: var(--fn-bg-surface);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-md);
  /* The table scrolls inside its own box; the page never scrolls sideways.
     LTR puts the bar on the right; the table below stays RTL. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  direction: ltr;
}

.fn-mkt-tablewrap > .fn-mkt-table {
  direction: rtl;
}

.fn-mkt-table {
  width: 100%;
  min-width: 640px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fn-fs-base);
  line-height: 1.35;
}

/* No position:sticky here. The wrap scrolls sideways, which makes it the
   scroll container a sticky cell resolves against, so a sticky th never
   moved. A long table opts into the shared page-level header instead
   (FnStickyHead, 37-sticky-head), which also follows the sideways swipe. */
.fn-mkt-table thead th {
  padding: var(--fn-space-2) var(--fn-space-3);
  background: var(--fn-bg-sunken);
  border-bottom: 1px solid var(--fn-border-strong);
  font-family: var(--fn-mkt-font-head);
  font-size: var(--fn-fs-xs);
  font-weight: var(--fn-fw-bold);
  line-height: 1.3;
  color: var(--fn-text-2);
  text-align: right;
  white-space: nowrap;
}

.fn-mkt-table tbody td {
  height: var(--fn-mkt-row-h);
  padding: var(--fn-space-2) var(--fn-space-3);
  border-bottom: 1px solid var(--fn-border);
  color: var(--fn-text-1);
  vertical-align: middle;
}

.fn-mkt-table tbody tr:last-child td { border-bottom: 0; }

.fn-mkt-table tbody tr:nth-child(even) td { background: var(--fn-mkt-zebra); }

.fn-mkt-table tbody tr:hover td { background: var(--fn-bg-hover); }

/* Numeric columns. `.num` on both th and td keeps header and body aligned. */
.fn-mkt-table th.num,
.fn-mkt-table td.num {
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  text-align: left;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

/* Institutional sessions. The shared .num alignment is for wide LTR-number
   lists. Here it parked each value on the left of its cell while the Hebrew
   header stayed on the right, so "תאריך" and "נטו" were not above their
   figures. Both edges share the right side of the cell. Dates stay LTR so
   dd/MM/yyyy does not flip. */
.fn-mkt-table.fn-mkt-table--inst {
  min-width: 520px;
  table-layout: fixed;
}
.fn-mkt-table.fn-mkt-table--inst th,
.fn-mkt-table.fn-mkt-table--inst td {
  text-align: right;
  direction: rtl;
  white-space: nowrap;
}
.fn-mkt-table.fn-mkt-table--inst th.fn-mkt-date,
.fn-mkt-table.fn-mkt-table--inst td.fn-mkt-date {
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  text-align: right;
}
.fn-mkt-table.fn-mkt-table--inst .fn-mkt-chg {
  min-width: 0;
  padding: 2px 6px;
  margin-inline-start: -6px;
  text-align: right;
  direction: rtl;
}

/* The identifying column carries more weight than the rest of the row. */
.fn-mkt-table td.name { font-weight: var(--fn-fw-medium); }
.fn-mkt-table td.name a { color: var(--fn-text-1); text-decoration: none; }
.fn-mkt-table td.name a:hover { color: var(--fn-brand); text-decoration: underline; }

.fn-mkt-table td.name small {
  display: block;
  font-family: var(--fn-mkt-font-num);
  font-size: var(--fn-fs-xs);
  font-weight: var(--fn-fw-regular);
  color: var(--fn-text-3);
  direction: ltr;
  unicode-bidi: isolate;
}

/* Sortable headers. The button is the control, so keyboard sorting works. */
.fn-mkt-table th[aria-sort] { padding: 0; }

.fn-mkt-table th .fn-mkt-sort {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: var(--fn-space-2) var(--fn-space-3);
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}
.fn-mkt-table th.num .fn-mkt-sort { justify-content: flex-end; direction: rtl; }
.fn-mkt-table th .fn-mkt-sort:hover { color: var(--fn-text-1); }

.fn-mkt-sort__arrow { font-size: 9px; opacity: 0; transition: opacity var(--fn-dur-fast); }
.fn-mkt-table th[aria-sort="ascending"] .fn-mkt-sort__arrow,
.fn-mkt-table th[aria-sort="descending"] .fn-mkt-sort__arrow { opacity: 1; }
.fn-mkt-table th[aria-sort="ascending"] .fn-mkt-sort__arrow::before { content: "\25B2"; }
.fn-mkt-table th[aria-sort="descending"] .fn-mkt-sort__arrow::before { content: "\25BC"; }
.fn-mkt-table th[aria-sort="none"] .fn-mkt-sort__arrow::before { content: "\25B4"; }

/* Change cell rendered as a tinted pill - scannable down a long column. */
.fn-mkt-chg {
  display: inline-block;
  min-width: 62px;
  padding: 2px 6px;
  border-radius: var(--fn-radius-sm);
  font-variant-numeric: tabular-nums;
  font-weight: var(--fn-fw-bold);
  text-align: center;
  direction: ltr;
  unicode-bidi: isolate;
}
.fn-mkt-chg--up   { background: var(--fn-up-bg);   color: var(--fn-market-up); }
.fn-mkt-chg--down { background: var(--fn-down-bg); color: var(--fn-market-down); }
.fn-mkt-chg--flat { background: var(--fn-bg-sunken); color: var(--fn-text-2); }

/* Dark mode: the light tint washes are too bright behind bold numerals, so
   the pill becomes a transparent wash of the semantic colour itself. */
:root[data-fn-theme="dark"] .fn-mkt-chg--up {
  background: rgba(94, 209, 124, 0.14);
  color: var(--fn-up-300);
}
:root[data-fn-theme="dark"] .fn-mkt-chg--down {
  background: rgba(242, 107, 107, 0.14);
  color: var(--fn-down-300);
}
:root[data-fn-theme="dark"] .fn-mkt .is-up   { color: var(--fn-up-300); }
:root[data-fn-theme="dark"] .fn-mkt .is-down { color: var(--fn-down-300); }

/* Toolbar above a list. The search and the selects are the shared
   controls (the field pill, and fn-dd). This block only places them:
   filters and search on one line, the average and the count under a
   hairline. It does not restyle the controls. */
.fn-mkt-list .fn-mkt-toolbar {
  display: flex;
  flex-direction: column;
  margin: 0 0 10px;
}

.fn-mkt-toolbar__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 0;
}

.fn-mkt-toolbar__search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 420px;
}

.fn-mkt-toolbar__search input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--fn-field-border);
  border-radius: var(--fn-radius-field);
  background: var(--fn-field-bg);
  color: var(--fn-field-text);
  font-family: var(--fn-font-ui);
  font-size: 13px;
  line-height: 1.2;
  box-shadow: none;
}
.fn-mkt-toolbar__search input::placeholder { color: var(--fn-field-placeholder); opacity: 1; }
.fn-mkt-toolbar__search input:hover { border-color: var(--fn-interactive-line); }
.fn-mkt-toolbar__search input:focus {
  outline: none;
  border-color: var(--fn-interactive);
  box-shadow: 0 0 0 3px var(--fn-interactive-wash);
}
.fn-mkt-toolbar__search input::-webkit-search-decoration,
.fn-mkt-toolbar__search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.fn-mkt-toolbar__select {
  min-height: 34px;
  padding: 0 var(--fn-space-2);
  border: 1px solid var(--fn-field-border);
  border-radius: var(--fn-radius-sm);
  background: var(--fn-field-bg);
  font-size: var(--fn-fs-sm);
  color: var(--fn-field-text);
  max-width: 220px;
}

/* Placement only. Shape, colour and radius stay on .fn-dd__trigger. */
.fn-mkt-toolbar__dd {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
}
.fn-ui .fn-mkt-toolbar__dd .fn-dd__trigger {
  min-width: 150px;
  max-width: 230px;
}
.fn-ui .fn-mkt-toolbar__dd .fn-dd__panel {
  width: max(100%, 300px);
  max-width: min(380px, calc(100vw - 24px));
  max-height: min(420px, 60vh);
  text-align: start;
}
.fn-ui .fn-mkt-toolbar__dd select:not([data-fn-dd-flat]) ~ .fn-dd__panel .fn-dd__option--l0 { font-weight: var(--fn-fw-bold); }
.fn-mkt-toolbar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  padding: 8px 0;
  border-top: 1px solid var(--fn-border);
}

.fn-mkt-toolbar__avg {
  font-size: var(--fn-fs-sm);
  color: var(--fn-text-3);
}

.fn-mkt-toolbar__count {
  margin-inline-start: auto;
  font-size: var(--fn-fs-sm);
  color: var(--fn-text-3);
  white-space: nowrap;
}

.fn-mkt-list .fn-mkt-toolbar__controls .fn-mkt-list__add {
  margin-inline-start: auto;
  min-height: 40px;
}

/* Selectable lists (קרנות סל): tick rows, add them to the portfolio. */
.fn-mkt-list__add { min-height: 34px; }
.fn-mkt-list__add[aria-disabled="true"] { opacity: 0.6; }
.fn-mkt-list__msg:empty { display: none; }
.fn-mkt-list__msg { font-size: var(--fn-fs-sm); color: var(--fn-text-2); }
.fn-mkt .fn-mkt-list__pick { width: 32px; padding-inline: var(--fn-space-2) 0; text-align: center; }
.fn-mkt input[name="fundIDlist[]"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--fn-accent);
  cursor: pointer;
}
.fn-mkt .fn-mkt-list__sub {
  display: block;
  margin-top: 2px;
  font-size: var(--fn-fs-xs);
  font-weight: var(--fn-fw-regular);
  color: var(--fn-text-3);
}
.fn-mkt a.fn-mkt-list__sub:hover { color: var(--fn-text-1); }
.fn-mkt .fn-mkt-list__cats { font-size: 12px; color: var(--fn-text-2); max-width: 280px; }
.fn-mkt .fn-mkt-list__cats a { color: inherit; }


/* ==========================================================================
   10. MOBILE LIST — cards, not a squeezed table
   --------------------------------------------------------------------------
   Below 768px a security list stops being a grid and becomes one tappable row
   per paper: name + symbol on the start side, last + change on the end side,
   and the secondary figures on a third line that is still visible rather than
   hidden behind a disclosure. Nothing essential is dropped.
   ========================================================================== */

.fn-mkt-cards { display: none; }

@media (max-width: 767px) {
  .fn-mkt-tablewrap--responsive { display: none; }

  .fn-mkt-cards {
    display: block;
    background: var(--fn-bg-surface);
    border: 1px solid var(--fn-border);
    border-radius: var(--fn-radius-md);
    overflow: hidden;
  }

  .fn-mkt-cardrow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px var(--fn-space-3);
    padding: var(--fn-space-3);
    border-bottom: 1px solid var(--fn-border);
    text-decoration: none;
    color: inherit;
  }
  .fn-mkt-cardrow:last-child { border-bottom: 0; }

  /* A card with a checkbox cannot itself be the link, so the name link is
     stretched over the card and the checkbox sits above it. */
  .fn-mkt-cardrow--pick {
    position: relative;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .fn-mkt-cardrow--pick > input[type="checkbox"] {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
  }
  .fn-mkt-cardrow--pick .fn-mkt-cardrow__name { grid-column: 2; text-decoration: none; }
  .fn-mkt-cardrow--pick .fn-mkt-cardrow__name::after { content: ""; position: absolute; inset: 0; }
  .fn-mkt-cardrow--pick .fn-mkt-cardrow__sub { grid-column: 2; }
  .fn-mkt-cardrow--pick .fn-mkt-cardrow__last { grid-column: 3; }
  .fn-mkt-cardrow--pick .fn-mkt-cardrow__chg { grid-column: 3; }
  .fn-mkt-cardrow__chglabel {
    margin-inline-end: 4px;
    font-family: var(--fn-font-ui);
    font-weight: var(--fn-fw-regular);
    font-size: var(--fn-fs-xs);
    color: var(--fn-text-3);
  }
  .fn-mkt-cardrow--pick .fn-mkt-cardrow__chg { direction: rtl; }

  .fn-mkt-toolbar__controls .fn-mkt-list__add { order: 10; flex: 1 1 100%; margin-inline-start: 0; }
  .fn-mkt-toolbar__search { flex-basis: 100%; max-width: none; }
  .fn-mkt-toolbar .fn-mkt-toolbar__select { flex: 1 1 140px; max-width: none; min-width: 0; }
  .fn-mkt-toolbar__dd { flex: 1 1 140px; }
  .fn-ui .fn-mkt-toolbar__dd .fn-dd__trigger { width: 100%; min-width: 0; max-width: none; }
  /* The second of two dropdowns sits at the screen's left edge: open its
     panel from that edge so it stays on screen. */
  .fn-ui .fn-mkt-toolbar__dd + .fn-mkt-toolbar__dd .fn-dd__panel {
    inset-inline-start: auto;
    inset-inline-end: 0;
  }
  .fn-mkt-cardrow:active { background: var(--fn-bg-hover); }

  .fn-mkt-cardrow__name {
    grid-column: 1;
    font-family: var(--fn-mkt-font-head);
    font-size: var(--fn-fs-base);
    font-weight: var(--fn-fw-medium);
    line-height: 1.3;
    color: var(--fn-text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .fn-mkt-cardrow__last {
    grid-column: 2;
    grid-row: 1;
    font-family: var(--fn-mkt-font-num);
    font-variant-numeric: tabular-nums;
    font-size: var(--fn-fs-base);
    font-weight: var(--fn-fw-bold);
    text-align: left;
    color: var(--fn-text-1);
    direction: ltr;
    unicode-bidi: isolate;
  }

  .fn-mkt-cardrow__sub {
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    gap: var(--fn-space-1) var(--fn-space-2);
    font-size: var(--fn-fs-xs);
    color: var(--fn-text-3);
  }
  .fn-mkt-cardrow__sub .fn-num { color: var(--fn-text-3); }

  .fn-mkt-cardrow__chg {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    font-family: var(--fn-mkt-font-num);
    font-variant-numeric: tabular-nums;
    font-size: var(--fn-fs-sm);
    font-weight: var(--fn-fw-bold);
    direction: ltr;
    unicode-bidi: isolate;
  }

  /* Tables that must stay tabular on mobile (e.g. OHLC) keep scrolling, but
     the font steps down one notch so more columns survive. */
  .fn-mkt-table { font-size: var(--fn-fs-sm); }
  .fn-mkt-table tbody td { height: var(--fn-mkt-row-h-compact); padding: 6px var(--fn-space-2); }
  .fn-mkt-table thead th { padding: 6px var(--fn-space-2); }
}


/* --------------------------------------------------------------------------
   List page: the category <select> is authored by the page (its options come
   from the code-behind) and is moved into the toolbar by fn-markets-list.js.
   It is styled for both positions so there is no flash of a full-width
   browser-default select before the move.
   -------------------------------------------------------------------------- */
.fn-mkt-list > select {
  min-height: 34px;
  max-width: 320px;
  margin-bottom: var(--fn-space-3);
  padding: 0 var(--fn-space-2);
  border: 1px solid var(--fn-field-border);
  border-radius: var(--fn-radius-sm);
  background: var(--fn-field-bg);
  font-size: var(--fn-fs-sm);
  color: var(--fn-field-text);
}

/* Once relocated it is a toolbar control and the toolbar owns its spacing. */
.fn-mkt-toolbar > select { margin-bottom: 0; }

.fn-mkt-list .fn-mkt-section__head { margin-bottom: var(--fn-space-3); }


/* ==========================================================================
   11. MOVERS / DASHBOARD WIDGETS
   ========================================================================== */

.fn-mkt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--fn-mkt-gap);
  margin: 0 0 var(--fn-space-6);
}

.fn-mkt-grid--wide { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }

/* Index tiles across the top of the overview. */
.fn-mkt-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--fn-space-3);
  margin: 0 0 var(--fn-space-6);
}

.fn-mkt-tile {
  display: flex;
  flex-direction: column;
  gap: var(--fn-space-1);
  padding: var(--fn-space-3);
  background: var(--fn-bg-surface);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-md);
  text-decoration: none;
  transition: border-color var(--fn-dur-fast) var(--fn-ease);
}
.fn-mkt-tile:hover { border-color: var(--fn-border-brand); text-decoration: none; }

.fn-mkt-tile__name {
  font-family: var(--fn-mkt-font-head);
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-medium);
  color: var(--fn-text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fn-mkt-tile__value {
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  font-size: var(--fn-fs-xl);
  font-weight: var(--fn-fw-bold);
  line-height: 1.1;
  color: var(--fn-text-1);
  direction: ltr;
  unicode-bidi: isolate;
}

.fn-mkt-tile__chg {
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-bold);
  direction: ltr;
  unicode-bidi: isolate;
}

.fn-mkt-tile__spark { height: 28px; margin-top: 2px; direction: ltr; }

/* Compact mover row inside a card. */
.fn-mkt-mover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--fn-space-3);
  padding: 7px var(--fn-mkt-card-pad);
  border-bottom: 1px solid var(--fn-border);
  font-size: var(--fn-fs-base);
  text-decoration: none;
  color: inherit;
}
.fn-mkt-mover:last-child { border-bottom: 0; }
.fn-mkt-mover:hover { background: var(--fn-bg-hover); text-decoration: none; }

.fn-mkt-mover__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fn-text-1);
  font-weight: var(--fn-fw-medium);
}

.fn-mkt-mover__last,
.fn-mkt-mover__chg {
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  font-size: var(--fn-fs-sm);
  direction: ltr;
  unicode-bidi: isolate;
}
.fn-mkt-mover__last { color: var(--fn-text-2); }
.fn-mkt-mover__chg { font-weight: var(--fn-fw-bold); min-width: 58px; text-align: left; }


/* --------------------------------------------------------------------------
   Market overview: ticker, mini tables, mover headings, FX cards.
   -------------------------------------------------------------------------- */

/* Indices strip. Filled by secdash.js; one swipeable row of chips. */
.fn-mkt-ticker {
  margin: 0 0 var(--fn-space-5);
  background: var(--fn-bg-surface);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-md);
  overflow: hidden;
  font-size: var(--fn-fs-sm);
}
.fn-mkt-ticker:empty { display: none; }

.fn-mkt-ticker__track {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.fn-mkt-tick {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "name name" "rate chg";
  gap: 2px var(--fn-space-3);
  min-width: 132px;
  padding: var(--fn-space-2) var(--fn-space-3);
  border-inline-start: 1px solid var(--fn-border);
  scroll-snap-align: start;
}
.fn-mkt-tick:first-child { border-inline-start: 0; }
.fn-mkt-tick:hover { background: var(--fn-bg-hover); }

.fn-mkt-tick__name {
  grid-area: name;
  font-size: var(--fn-fs-xs);
  white-space: nowrap;
}
.fn-mkt-tick__name a { color: var(--fn-text-2); text-decoration: none; }
.fn-mkt-tick__name a::after { content: ""; position: absolute; inset: 0; }
.fn-mkt-tick__name strong { font-weight: var(--fn-fw-medium); }
.fn-mkt-tick__rate {
  grid-area: rate;
  font-weight: var(--fn-fw-bold);
  color: var(--fn-text-1);
  direction: ltr;
  text-align: right;
}
.fn-mkt-tick__chg {
  grid-area: chg;
  font-weight: var(--fn-fw-bold);
  direction: ltr;
  text-align: left;
}
.fn-mkt-tick__chg.pnum { color: var(--fn-up); }
.fn-mkt-tick__chg.mnum { color: var(--fn-down); }

/* The overview cards differ a lot in height (5 index leaders vs 16 movers),
   so a row grid leaves holes under the short ones. Columns pack them. */
.fn-mkt-dash__grid {
  display: block;
  columns: 3 300px;
  column-gap: var(--fn-mkt-gap);
}
.fn-mkt-dash__grid > * {
  break-inside: avoid;
  margin: 0 0 var(--fn-mkt-gap);
}

/* The two-column lists inside overview cards. Compact rows, no outer border
   (the card supplies it), header kept for semantics but visually quiet. */
.fn-mkt-minitable {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fn-fs-base);
}

.fn-mkt-minitable thead th {
  padding: 5px var(--fn-mkt-card-pad);
  background: var(--fn-bg-sunken);
  border-bottom: 1px solid var(--fn-border);
  font-family: var(--fn-mkt-font-head);
  font-size: var(--fn-fs-xs);
  font-weight: var(--fn-fw-medium);
  color: var(--fn-text-3);
  text-align: right;
}
.fn-mkt-minitable thead th.num { text-align: left; }

.fn-mkt-minitable tbody td {
  height: var(--fn-mkt-row-h-compact);
  padding: 4px var(--fn-mkt-card-pad);
  border-bottom: 1px solid var(--fn-border);
  vertical-align: middle;
}
.fn-mkt-minitable tbody tr:last-child td { border-bottom: 0; }
.fn-mkt-minitable tbody tr:hover td { background: var(--fn-bg-hover); }

.fn-mkt-minitable td.name {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: var(--fn-fw-medium);
}
.fn-mkt-minitable td.name a { color: var(--fn-text-1); text-decoration: none; }
.fn-mkt-minitable td.name a:hover { color: var(--fn-brand); text-decoration: underline; }

.fn-mkt-minitable td.num {
  width: 1%;
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  text-align: left;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

/* "עולות" / "יורדות" - the label the old page left as an empty <th>. */
.fn-mkt-movers__label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: var(--fn-space-2) var(--fn-mkt-card-pad);
  background: var(--fn-bg-sunken);
  border-bottom: 1px solid var(--fn-border);
  font-family: var(--fn-mkt-font-head);
  font-size: var(--fn-fs-xs);
  font-weight: var(--fn-fw-bold);
  letter-spacing: 0.02em;
}
.fn-mkt-movers__label::before { font-size: 9px; }
.fn-mkt-movers__label.is-up::before { content: "\25B2"; }
.fn-mkt-movers__label.is-down::before { content: "\25BC"; }

/* The generated mini tables sit directly under their label, so the label's
   bottom border is the only separator needed. */
.fn-mkt-movers .fn-mkt-minitable thead { display: none; }

.fn-mkt-fx { padding: var(--fn-mkt-card-pad); display: grid; gap: var(--fn-space-3); }

.fn-mkt-fx .fxCard {
  padding: var(--fn-space-3);
  background: var(--fn-bg-sunken);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-sm);
}

.fn-mkt-fx .fxCardHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fn-space-2);
  margin-bottom: var(--fn-space-2);
}

.fn-mkt-fx .fxName {
  font-family: var(--fn-mkt-font-head);
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-bold);
  color: var(--fn-text-2);
}
.fn-mkt-fx .fxNums { display: flex; align-items: baseline; gap: var(--fn-space-2); }
.fn-mkt-fx .fxRate {
  font-size: var(--fn-fs-lg);
  font-weight: var(--fn-fw-bold);
  color: var(--fn-text-1);
}
.fn-mkt-fx .fxCng { font-size: var(--fn-fs-sm); font-weight: var(--fn-fw-bold); }
.fn-mkt-fx .fxChart { height: 56px; direction: ltr; }

/* Legacy colour classes still emitted by some live scripts. Mapped onto the
   market tokens so they stop being olive/beige, rather than hunting every
   emitter down in one pass. */
.fn-mkt .gpnum { color: var(--fn-market-up); font-variant-numeric: tabular-nums; }
.fn-mkt .gnnum { color: var(--fn-market-down); font-variant-numeric: tabular-nums; }
:root[data-fn-theme="dark"] .fn-mkt .gpnum { color: var(--fn-up-300); }
:root[data-fn-theme="dark"] .fn-mkt .gnnum { color: var(--fn-down-300); }


/* --------------------------------------------------------------------------
   Index table (madadim) — replaces the tile grid.

   Udi: the boxes were "מיותרות (תופסות נפח)". Rows put the whole market on
   one screen and let the eye compare a column of changes, which a grid of
   cards cannot do.
   -------------------------------------------------------------------------- */
.fn-mkt-idxtable { min-width: 420px; }

.fn-mkt-idxtable td.name { font-weight: var(--fn-fw-medium); }
.fn-mkt-idxtable td.name a { color: var(--fn-text-1); text-decoration: none; }
.fn-mkt-idxtable td.name a:hover { color: var(--fn-brand); text-decoration: underline; }
.fn-mkt-idxtable td.name strong { font-weight: inherit; }

/* The sparkline keeps its own cell so it never squeezes the numbers. */
.fn-mkt-idxtable__sparkcol { width: 110px; }
.fn-mkt-idxtable .schartfc {
  height: 26px;
  direction: ltr;
  cursor: pointer;
}

/* Legacy blink classes from the live-update path: let them tint the text but
   never repaint the row, which read as a flash of colour on a dark page. */
.fn-mkt .blinkitg { color: var(--fn-market-up); }
.fn-mkt .blinkitr { color: var(--fn-market-down); }
:root[data-fn-theme="dark"] .fn-mkt .blinkitg { color: var(--fn-up-300); }
:root[data-fn-theme="dark"] .fn-mkt .blinkitr { color: var(--fn-down-300); }
/* The blink routine leaves inline #FFFFFF / #333332 backgrounds behind,
   which show as boxes on striped rows and on the other theme. */
.fn-mkt .blinkitg:not(.fn-mkt-chg),
.fn-mkt .blinkitr:not(.fn-mkt-chg) { background-color: transparent !important; }
.fn-mkt .fn-mkt-chg--up.blinkitg,
.fn-mkt .fn-mkt-chg--up.blinkitr { background-color: var(--fn-up-bg) !important; }
.fn-mkt .fn-mkt-chg--down.blinkitg,
.fn-mkt .fn-mkt-chg--down.blinkitr { background-color: var(--fn-down-bg) !important; }
.fn-mkt .fn-mkt-chg--flat.blinkitg,
.fn-mkt .fn-mkt-chg--flat.blinkitr { background-color: var(--fn-bg-sunken) !important; }
:root[data-fn-theme="dark"] .fn-mkt .fn-mkt-chg--up.blinkitg,
:root[data-fn-theme="dark"] .fn-mkt .fn-mkt-chg--up.blinkitr { background-color: rgba(94, 209, 124, 0.14) !important; }
:root[data-fn-theme="dark"] .fn-mkt .fn-mkt-chg--down.blinkitg,
:root[data-fn-theme="dark"] .fn-mkt .fn-mkt-chg--down.blinkitr { background-color: rgba(242, 107, 107, 0.14) !important; }
/* Inside a tinted pill the pill owns the colour. */
.fn-mkt .fn-mkt-chg.blinkitg,
.fn-mkt .fn-mkt-chg.blinkitr { color: inherit; }

/* Direction belongs to the change column; a price coloured green or red
   reads as a second change figure. */
.fn-mkt .fn-mkt-idxtable td[id^="rate"] .blinkitg,
.fn-mkt .fn-mkt-idxtable td[id^="rate"] .blinkitr { color: var(--fn-text-1); }
.fn-mkt .fn-mkt-idxtable td.pnum { color: var(--fn-up); }
.fn-mkt .fn-mkt-idxtable td.mnum { color: var(--fn-down); }
.fn-mkt .fn-mkt-idxtable td.pnum,
.fn-mkt .fn-mkt-idxtable td.mnum { font-weight: var(--fn-fw-bold); direction: ltr; }
.fn-mkt .fn-mkt-idxtable__volcol { color: var(--fn-text-2); }

@media (max-width: 480px) {
  /* The trend column is the first thing to go when space runs out - the
     change figure next to it carries the same information. */
  .fn-mkt-idxtable__sparkcol { display: none; }
  .fn-mkt-idxtable { min-width: 0; }
}

/* --------------------------------------------------------------------------
   Index composition card (madad.aspx, fn-madad-comp.js).

   The index page uses the stock page's quote stage (8b): the card on the
   right, the chart across the rest. The card here is the index composition
   rather than the day's figures, and it is the same card (.fn-mkt-key),
   holding the same index table (.fn-mkt-idxtable) /madadim and /secMadad
   use, with three columns: paper, price, today's change.

   A composition runs to 125 papers, and the stage stretches both columns
   to the taller one, so a list in normal flow would make the chart
   thousands of pixels tall. From 992px, where the card sits beside the
   chart, the list gets no height of its own (flex-basis 0): the chart sets
   the row and the list scrolls inside the card. It is then a scrolling pane
   for the shared sticky header, which sticks to the pane's own top edge,
   so the markets sub-nav offset (--fn-sticky-stack) does not apply in it.
   Below 992px the card stacks under the chart, and the index data and
   returns come after it (madado.aspx). Laid out in full, the list is some
   4,700px on a phone and buries them, so there it is capped and scrolls
   inside the card too: the same pane, with a height of its own.
   -------------------------------------------------------------------------- */
.fn-mkt-comp {
  display: flex;
  flex-direction: column;
}

.fn-mkt-comp__list { min-width: 0; }

/* Three short columns fit the card, so the table never needs the list
   tables' sideways-scroll minimum; long names wrap instead. */
.fn-mkt-table.fn-mkt-comp__table { min-width: 0; }
.fn-mkt-comp__table th .fn-mkt-sort,
.fn-mkt-comp__table thead th:not([aria-sort]),
.fn-mkt-comp__table tbody td {
  padding-inline: var(--fn-space-2);
}
.fn-mkt-comp__table td.name { overflow-wrap: anywhere; }

.fn-mkt-comp__more {
  align-self: flex-start;
  margin-top: var(--fn-space-3);
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-bold);
  color: var(--fn-brand);
}

@media (min-width: 992px) {
  /* The plot sets the stage's height, so it gets the generous size the
     stock card used to give it by stretching (the card is no longer the
     taller column). */
  .fn-mkt-stage--comp .fn-mkt-chart__plot { height: var(--fn-mkt-plot-h-comp); }

  .fn-mkt-comp__list {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    --fn-sticky-stack: 0px;
  }
}

@media (max-width: 991px) {
  /* About a dozen rows, never more than the screen: the card with its
     title and its link fits one phone screen, and what follows starts one
     card down. The cap stays under the height of 16 rows (about 600px),
     the fewest that get the sticky header (FnStickyHead.MIN_ROWS), so a
     list with that header always overflows here and is a real pane (a box
     that only could scroll would trap a header meant for the window). No
     overscroll containment, unlike the desktop pane: at either end of the
     list a finger goes on scrolling the page instead of stopping in the
     card. */
  .fn-mkt-comp__list {
    max-height: clamp(260px, 60vh, 520px);
    overflow-y: auto;
    scrollbar-width: thin;
    --fn-sticky-stack: 0px;
  }
}

/* secMadad: the index itself, above its constituents. Markup from
   secMadad.js generateChartHtmlM(): .madadbox > .mainbox > name, spark,
   rate, change. */
.fn-mkt-secmadad__index:empty { display: none; }
.fn-mkt-secmadad__index { margin: 0 0 var(--fn-space-4); }
.fn-mkt-secmadad__index .row { margin: 0; }
.fn-mkt-secmadad__index .mainbox {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px auto auto;
  align-items: center;
  gap: var(--fn-space-4);
  padding: var(--fn-space-3) var(--fn-space-4);
  background: var(--fn-bg-surface);
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius-md);
}
.fn-mkt-secmadad__index .mainbox > * { float: none; width: auto; padding: 0; text-align: inherit; }
.fn-mkt-secmadad__index .sctitilefc a { font-weight: var(--fn-fw-bold); color: var(--fn-text-1); text-decoration: none; }
.fn-mkt-secmadad__index .schartfc { height: 32px; direction: ltr; cursor: pointer; }
.fn-mkt-secmadad__index .ratepart { font-size: var(--fn-fs-lg); font-weight: var(--fn-fw-bold); direction: ltr; }
.fn-mkt-secmadad__index .ratepart span { color: var(--fn-text-1) !important; }
.fn-mkt-secmadad__index .cngpart { font-weight: var(--fn-fw-bold); direction: ltr; }
.fn-mkt-secmadad__index .cngpart.pnum { color: var(--fn-up); }
.fn-mkt-secmadad__index .cngpart.mnum { color: var(--fn-down); }
@media (max-width: 480px) {
  .fn-mkt-secmadad__index .mainbox { grid-template-columns: minmax(0, 1fr) auto auto; }
  .fn-mkt-secmadad__index .schartfc { display: none; }
}


/* --------------------------------------------------------------------------
   TRADE BRANDING — thin green stripe + F mark

   Udi: "פס דק ירוק ויבינו שזה פאנדר" and "משהו אלגנטי בסגנון פס דק ו F זה
   יכול להיות סימן בדפים של הטרייד (לא חייבים לוגו גדול מלא)".

   This is also the answer to Yoav's objection ("אם יש דף שיש לו אותו מידע
   אבל זה נראה אחרת אתה לא מבין שזה פאנדר"): the trade pages can look like a
   terminal and still be unmistakably FUNDER, without spending header height
   on a full logo.
   -------------------------------------------------------------------------- */
.fn-mkt-brandbar {
  display: flex;
  align-items: center;
  gap: var(--fn-space-2);
  margin: 0 0 var(--fn-space-3);
  padding: 0;
}

/* The stripe itself: 3px, brand green, running the width of the content. */
.fn-mkt-brandbar::after {
  content: "";
  flex: 1 1 auto;
  height: 3px;
  border-radius: var(--fn-radius-pill);
  background: var(--fn-interactive);
}

.fn-mkt-brandbar__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: var(--fn-radius-sm);
  background: var(--fn-accent);
  font-family: var(--fn-mkt-font-head);
  font-size: 14px;
  font-weight: var(--fn-fw-extrabold);
  line-height: 1;
  color: var(--fn-on-accent);
  text-decoration: none;
  /* The glyph is an F; a round mark made it read as a generic avatar. */
  letter-spacing: 0;
}
.fn-mkt-brandbar__mark:hover { background: var(--fn-accent-hover); text-decoration: none; }

.fn-mkt-brandbar__label {
  flex: 0 0 auto;
  font-family: var(--fn-mkt-font-head);
  font-size: var(--fn-fs-xs);
  font-weight: var(--fn-fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fn-text-3);
}


/* --------------------------------------------------------------------------
   Index tile grid (madadim / secMadad).

   madadim.js emits a fixed structure - a .row every seven tiles, each tile a
   .col-lg-2 wrapping .mainbox - which with Bootstrap's floats and the pages'
   own `width:14.25%` meant exactly seven columns at every size above 425px,
   and a stack below it. Turning the generated .row into a grid gives a tile
   count that follows the viewport instead, without touching the generator.
   -------------------------------------------------------------------------- */
.fn-mkt #allIndicesChart .row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: var(--fn-space-3);
  margin: 0 0 var(--fn-space-3);
}

.fn-mkt #allIndicesChart .row > [class*="col-"] {
  width: auto !important;
  float: none !important;
  padding: 0 !important;
  min-width: 0;
}

.fn-mkt .mainbox {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: auto !important;
  margin: 0 !important;
  padding: var(--fn-space-3);
  background: var(--fn-bg-surface);
  border: 1px solid var(--fn-border) !important;
  border-radius: var(--fn-radius-md);
  transition: border-color var(--fn-dur-fast) var(--fn-ease);
}
.fn-mkt .mainbox:hover { border-color: var(--fn-border-brand) !important; }

.fn-mkt .mainbox .sctitilefc {
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  font-family: var(--fn-mkt-font-head);
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-medium);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fn-mkt .mainbox .sctitilefc a { color: var(--fn-text-2) !important; text-decoration: none; }
.fn-mkt .mainbox:hover .sctitilefc a { color: var(--fn-text-1) !important; }

/* Level and change share one line instead of floating on separate rows. */
.fn-mkt .mainbox .ratepart,
.fn-mkt .mainbox .cngpart {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--fn-mkt-font-num);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}
.fn-mkt .mainbox .ratepart {
  font-size: var(--fn-fs-lg);
  font-weight: var(--fn-fw-bold);
  color: var(--fn-text-1);
  text-align: left !important;
}
.fn-mkt .mainbox .cngpart {
  font-size: var(--fn-fs-sm);
  font-weight: var(--fn-fw-bold);
  text-align: left !important;
}

.fn-mkt .mainbox .schartfc {
  height: 34px;
  margin: 2px 0;
  direction: ltr;
  background: none !important;
  border: 0 !important;
}

/* The legacy red/green border hints become the semantic market colours. */
.fn-mkt .bdrred { border-right: 3px solid var(--fn-market-down) !important; }
.fn-mkt .bdrgreen { border-right: 3px solid var(--fn-market-up) !important; }


/* ==========================================================================
   12. FUND HOLDINGS
   --------------------------------------------------------------------------
   Periodic reported holdings. The reporting date is part of the component,
   not a footnote, because presenting a stale report as a live figure would be
   the single most misleading thing this page could do.
   ========================================================================== */

.fn-mkt-holdings__summary { margin: 0 0 var(--fn-space-3); }

.fn-mkt-asof {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--fn-radius-pill);
  background: var(--fn-bg-sunken);
  font-size: var(--fn-fs-xs);
  color: var(--fn-text-2);
}


/* ==========================================================================
   13. STATES — loading / empty / error
   ========================================================================== */

.fn-mkt-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--fn-space-2);
  min-height: 140px;
  padding: var(--fn-space-6) var(--fn-space-4);
  text-align: center;
  color: var(--fn-text-3);
  font-size: var(--fn-fs-base);
}

.fn-mkt-state--error { color: var(--fn-market-down); }

.fn-mkt-state__action { margin-top: var(--fn-space-2); }

/* Skeleton shimmer for data that is on its way. */
.fn-mkt-skel {
  background: linear-gradient(
    90deg,
    var(--fn-bg-sunken) 25%,
    var(--fn-bg-hover) 37%,
    var(--fn-bg-sunken) 63%
  );
  background-size: 400% 100%;
  border-radius: var(--fn-radius-sm);
  animation: fn-mkt-shimmer 1.3s ease-in-out infinite;
}

.fn-mkt-skel--line { height: 12px; margin-bottom: 8px; }
.fn-mkt-skel--plot { height: 100%; min-height: 240px; }

@keyframes fn-mkt-shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}


/* ==========================================================================
   14. ACCESSIBILITY
   ========================================================================== */

.fn-mkt a:focus-visible,
.fn-mkt button:focus-visible,
.fn-mkt input:focus-visible,
.fn-mkt select:focus-visible,
.fn-mkt [tabindex]:focus-visible {
  outline: var(--fn-focus-width) solid var(--fn-focus);
  outline-offset: var(--fn-focus-offset);
  border-radius: var(--fn-radius-sm);
}

.fn-mkt .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Direction is also encoded in the glyph, so colour is never the only channel
   carrying whether a number is a gain or a loss. */
.fn-mkt .fn-dir::before { font-size: 0.85em; margin-inline-end: 1px; }
.fn-mkt .is-up .fn-dir::before,
.fn-mkt .fn-dir--up::before { content: "\25B2"; }
.fn-mkt .is-down .fn-dir::before,
.fn-mkt .fn-dir--down::before { content: "\25BC"; }

@media (prefers-reduced-motion: reduce) {
  .fn-mkt *,
  .fn-mkt *::before,
  .fn-mkt *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fn-mkt-skel { animation: none; background: var(--fn-bg-sunken); }
}

/* Windows high-contrast / forced colours: let the OS palette through, but keep
   the structural borders that carry the table grid. */
@media (forced-colors: active) {
  .fn-mkt-card,
  .fn-mkt-tablewrap,
  .fn-mkt-stats,
  .fn-mkt-perf { border-color: CanvasText; }
  .fn-mkt-chg { border: 1px solid CanvasText; }
}


/* ==========================================================================
   15. LEGACY BRIDGE
   --------------------------------------------------------------------------
   Trade pages carried page-level <style> blocks written for Sidebar2.Master's
   dark sidebar shell (fixed pixel widths, beige/olive hardcodes, LTR-leaking
   chart wrappers). Those blocks are being removed page by page; until a page
   is converted these few rules stop the old widths from forcing a horizontal
   scroll inside the new container.
   ========================================================================== */

.fn-mkt [id="allIndicesPC"],
.fn-mkt .pagWd {
  width: 100% !important;
  float: none !important;
}

.fn-mkt #chart-container {
  width: 100% !important;
  max-width: 100%;
}

/* Legacy tables that have not been re-marked yet still get readable numerals
   and row heights rather than the old 2px padding. */
.fn-mkt table:not(.fn-mkt-table) { max-width: 100%; }

@media print {
  .fn-mkt-subnav,
  .fn-mkt-pagenav,
  .fn-mkt-quote__actions,
  .fn-mkt-ranges { display: none !important; }
  .fn-mkt-card, .fn-mkt-tablewrap { border-color: #999; box-shadow: none; }
}
