/* ==========================================================================
   FUNDER — Homepage readability layer
   --------------------------------------------------------------------------
   Linked from index.aspx ONLY, inside the ticker placeholder: that is after
   every fn/ stylesheet in Site1.Master and before the first homepage element,
   so equal-specificity rules here win on source order and nothing paints at
   the old size first. Site1.Master is shared by list pages, login, portfolio
   and about — none of them load this file.

   Why: the readership skews older, and the homepage set most of its reading
   text at 11-15px in regular weight. Sizes sit about one pixel above the
   site scale (a notch back from the first bump, which read too large in
   the feed). Weights stay one step up (400->500, 500->600, 600->700).
   Yoav 23/11: secondary text (section CTA, meta lines, table headers,
   pills) had stayed too small, so #mainContent now has a 13px floor.
   Ticker, index cards, header, rail and footer are untouched.

   Mechanism, in order of preference:
     1. Tokens, scoped to the homepage content (#mainContent) and the
        ticker — the header, rail and footer keep the global scale.
     2. Editorial tokens re-set where 07-feed.css sets them (.fn-feed and
        the band container query), because a closer declaration wins.
     3. Literal px rules mirrored with the same selector and media query.
   ========================================================================== */

/* 1. Control scale + weights ------------------------------------------- */
.fn-ui .fn-ticker {
  --fn-fs-xs:   11.5px;
  --fn-fs-sm:   12.5px;
  --fn-fs-base: 14.5px;
  --fn-fs-md:   15.5px;
  --fn-fs-lg:   17.5px;
  --fn-fs-xl:   21px;
  --fn-fs-2xl:  27px;
}

.fn-ui #mainContent {
  --fn-fs-xs:   13px;
  --fn-fs-sm:   13.5px;
  --fn-fs-base: 14.5px;
  --fn-fs-md:   15.5px;
  --fn-fs-lg:   17.5px;
  --fn-fs-xl:   21px;
  --fn-fs-2xl:  27px;

  --fn-type-card-phone: 17px;
}

.fn-ui #mainContent,
.fn-ui .fn-ticker {

  --fn-fw-regular:  500;
  --fn-fw-emphasis: 600;
  --fn-fw-medium:   700;
  --fn-fw-semibold: 700;
}

@media (max-width: 359px) {
  .fn-ui #mainContent {
    --fn-type-card-phone: 16px;
  }
}

/* 2. Editorial feed scale ---------------------------------------------- */
.fn-ui .fn-feed {
  --fn-ed-lead: 27px;
  --fn-ed-split: 22px;
  --fn-ed-duo: 18px;
  --fn-ed-trio: 16px;
  --fn-ed-brief: 15px;
}

@container fn-feed (min-width: 700px) {
  .fn-ui .fn-feed__band {
    --fn-ed-lead: 31px;
    --fn-ed-split: 24px;
  }
}

@supports not (container-type: inline-size) {
  @media (min-width: 992px) {
    .fn-ui .indexArticles .fn-feed__band {
      --fn-ed-lead: 31px;
      --fn-ed-split: 24px;
    }
  }
}

/* Hero */
.fn-ui .fn-hero__title {
  font-size: clamp(21px, 2.4vw, 30px);
}

.fn-ui .fn-hero__subtitle {
  font-size: clamp(14px, 1.2vw, 16.5px);
}

/* Data tables (sidebar + phone) */
.fn-ui .fn-data-module {
  --fn-data-name-size: 13px;
  --fn-data-num-size: 13px;
  --fn-data-head-size: 13px;
}

.fn-ui .fn-data-module--compact {
  --fn-data-name-size: 14px;
  --fn-data-num-size: 14px;
  --fn-data-head-size: 13px;
}

.fn-ui .fn-data-module--standard {
  --fn-data-head-size: 13px;
}

/* 09-data.css re-sets the header size for the three-column compact layout
   and for the narrow standard container; mirrored here. */
.fn-ui .fn-data-module--compact.is-cols3 {
  --fn-data-head-size: 13px;
}

@container fn-data (max-width: 349px) {
  .fn-ui .fn-data-module--standard .fn-data-table {
    --fn-data-head-size: 13px;
  }
}

/* Dropdown: at 13px the label no longer fits its 40% cap, and the selected
   value must never be cut before the label. The label gives way first (it
   may take the room it needs, and shrinks to an ellipsis); the value holds.
   The value stays at the 13px floor, not the 13.5px sm token: at 1024 the
   ETF trigger is 135px wide and "כותרת קרן סל" needs 77px of it. */
.fn-ui #mainContent .fn-dd__label {
  max-width: none;
  min-width: 0;
  flex-shrink: 1;
}

.fn-ui #mainContent .fn-dd__value {
  font-size: 13px;
  flex-shrink: 0;
}

/* Magazine meta and action sit in a narrow fixed column (about 77px at
   1440); at 13px they wrap and orphan the arrow, so they keep 11.5px. */
.fn-ui .fn-magazine__meta,
.fn-ui .fn-magazine__action {
  font-size: 11.5px;
}

/* Average moves in the quick-look sector rows (34-movers.css) */
.fn-ui .fn-sectors__avg {
  font-size: 13px;
}

/* Fund-type toggle (קרנות מנוהלות / קרנות מחקות and the other pairs).
   The token above made it 12.5px bold; on a 1x Windows screen the top bar
   of the Hebrew letters fell between two pixel rows and looked grainy
   (Yoav). 14px puts it on one row. The compact selector is listed because
   09-data.css sets that one with a stronger selector. */
.fn-ui .fn-data-segment__option,
.fn-ui .fn-data-module--compact .fn-data-segment__option {
  font-size: 14px;
}

@media (max-width: 359px) {
  .fn-ui .fn-data-segment__option,
  .fn-ui .fn-data-module--compact .fn-data-segment__option {
    font-size: 13px;
  }
}

/* View switch + category jump */
.fn-ui .fn-view-switch__opt {
  font-size: 14px;
  font-weight: 600;
}

/* Section-header CTA ("עוד כתבות"): 08-section.css sets it from the xs token
   in four places (base, dense, desktop, phone); the dense one is stronger.
   Yoav 23/11: in grey it was still hard to find, so it reads as a link: the
   text-safe green (--fn-interactive-ink, which the soft theme already remaps
   to its on-canvas ink inside the section header), bold, a solid chevron,
   and an underline on hover. */
.fn-ui .fn-section-header__cta,
.fn-ui .fn-section-header--dense .fn-section-header__cta {
  font-size: 14px;
  font-weight: 700;
  color: var(--fn-interactive-ink);
}

/* Light, white and classic: the header stands on the page wallpaper, not on
   a white card, and --fn-interactive-ink (green-700) measures 4.4-4.6:1
   there. The deepest brand step (--fn-brand-hover, green-800) gives 6.2:1+.
   Dark keeps its light green; soft keeps its on-canvas ink. */
:root:not([data-fn-theme="dark"]):not([data-fn-theme="soft"]) .fn-ui .fn-section-header__cta {
  color: var(--fn-brand-hover);
}

.fn-ui .fn-section-header__cta::after,
.fn-ui .fn-section-header--dense .fn-section-header__cta::after {
  width: 6px;
  height: 6px;
  border-top-width: 2px;
  border-left-width: 2px;
  opacity: 1;
}

.fn-ui .fn-section-header__cta:hover,
.fn-ui .fn-section-header__cta:focus {
  color: var(--fn-interactive-ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

/* Sister-site pills in the section header */
.fn-ui .fn-site-link {
  font-size: 12.5px;
}

/* Hero author, date and kicker (06-hero.css uses the sm token) */
.fn-ui .fn-hero__author,
.fn-ui .fn-hero__date {
  font-size: 13.5px;
}

/* Author / date lines inherit the body weight rather than a token. */
.fn-ui .fn-feed__meta,
.fn-ui .fn-hero__meta,
.fn-ui .fn-chrono__meta {
  font-weight: 500;
}

/* Chronological feed */
.fn-ui .fn-chrono__meta {
  font-size: 13px;
}

.fn-ui .fn-chrono__loading,
.fn-ui .fn-chrono__end,
.fn-ui .fn-chrono__status {
  font-size: 13px;
}

/* The daily-rank board */
.fn-ui .fn-board__search input,
.fn-ui .fn-board__search input[type="search"] {
  font-size: 13px;
}

/* 600, not 700: 13px bold breaks Hebrew glyphs on 1x Windows (Motti, 25/11). */
.fn-ui .fn-board__table th {
  font-size: 13px;
  font-weight: 600;
}

.fn-ui .fn-board__sort {
  font-size: 13px;
  font-weight: 600;
}

.fn-ui .fn-board__num {
  font-size: 13px;
  font-weight: 700;
}

.fn-ui .fn-board__num--plain {
  font-weight: var(--fn-fw-emphasis);
}

.fn-ui .fn-board__name a {
  font-size: 13.5px;
  font-weight: 700;
}

.fn-ui .fn-board__place {
  font-size: 13px;
}

.fn-ui .fn-board__status {
  font-size: 13px;
}

/* Magazine slot */
.fn-ui .fn-magazine__rail-label {
  font-size: 13px;
}

/* Index cards. Names are nowrap + ellipsis in a fixed card, so they move
   one pixel only; the figures are already the largest type on the row. */
.fn-ui #mdlFrame .fn-index-card__name,
.fn-ui #mdlFrame .fn-index-card .sctitile {
  font-size: 16px;
}

/* The index level in the card's corner (04-indices.css) keeps its own
   size; only the weight is raised here, as for every figure on the row. */
.fn-ui #mdlFrame .fn-index-card__rate {
  font-weight: 700;
}

.fn-ui #mdlFrame .fn-market-status {
  font-size: 13px;
}

/* Ticker */
.fn-ui .fn-ticker .fn-ticker__cng,
.fn-ui .fn-ticker .ticker-stock-change {
  font-weight: 700;
}

@media (min-width: 768px) {
  .fn-ui .fn-chrono__title {
    font-size: 19px;
  }
}

@media (min-width: 1000px) {
  .fn-ui #mdlFrame .fn-index-card__name,
  .fn-ui #mdlFrame .fn-index-card .sctitile {
    font-size: 14px;
  }
}

@media (min-width: 1400px) {
  .fn-ui #mdlFrame .fn-index-card__name,
  .fn-ui #mdlFrame .fn-index-card .sctitile {
    font-size: 15px;
  }
}

/* 3. Phone ------------------------------------------------------------- */
@media (max-width: 767px) {
  .fn-ui .fn-hero__title {
    font-size: clamp(22px, 6vw, 27px);
  }

  .fn-ui .fn-feed__meta,
  .fn-ui .fn-chrono__meta {
    font-size: 13px;
  }

  .fn-ui .fn-hero__author,
  .fn-ui .fn-hero__date,
  .fn-ui .fn-hero__meta-sep {
    font-size: 13px;
  }

  .fn-ui .fn-section-header__title,
  .fn-ui .fn-section-header--dense .fn-section-header__title {
    font-size: 15px;
  }

  .fn-ui .fn-site-link {
    font-size: 12px;
  }

  .fn-ui .fn-magazine__title {
    font-size: 16px;
  }

  .fn-ui .fn-view-switch__opt {
    font-size: 13.5px;
  }

  .fn-ui .fn-data-module--compact {
    --fn-data-name-size: 14px;
    --fn-data-num-size: 14px;
  }

  .fn-ui .fn-data-module--standard .fn-data-table {
    --fn-data-num-size: 14px;
    --fn-data-head-size: 13px;
  }

  .fn-ui #mdlFrame .fn-index-card__name,
  .fn-ui #mdlFrame .fn-index-card .sctitile {
    font-size: 13px;
  }


  .fn-ui #mdlFrame .fn-market-status,
  .fn-ui #mdlFrame .indices-carousel-wrap.has-index-nav .fn-market-status {
    font-size: 12.5px;
  }
}

@media (max-width: 360px) {
  .fn-ui #mdlFrame .fn-index-card__name,
  .fn-ui #mdlFrame .fn-index-card .sctitile {
    font-size: 12px;
  }
}

@media (max-width: 359px) {
  .fn-ui .fn-magazine__title {
    font-size: 15px;
  }

  .fn-ui .fn-data-module--compact {
    --fn-data-name-size: 13px;
    --fn-data-num-size: 13px;
  }
}

/* A column label can be wider than its numeric column on a phone: let the
   header wrap to two lines instead of spilling past the cell and adding a
   sideways scroll to the table. */
.fn-ui .fn-board__table th .fn-board__sort {
  white-space: normal;
  max-width: 100%;
}
