/* ==========================================================================
   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).

   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 #mainContent,
.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-type-card-phone: 17px;

  --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: 12.5px;
  --fn-data-head-size: 11.5px;
}

.fn-ui .fn-data-module--compact {
  --fn-data-name-size: 14px;
  --fn-data-num-size: 14px;
  --fn-data-head-size: 12px;
}

.fn-ui .fn-data-module--standard {
  --fn-data-head-size: 12px;
}

/* 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: 13.5px;
  font-weight: 600;
}

/* 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: 12px;
}

.fn-ui .fn-chrono__loading,
.fn-ui .fn-chrono__end,
.fn-ui .fn-chrono__status {
  font-size: 12px;
}

/* The daily-rank board */
.fn-ui .fn-board__search input,
.fn-ui .fn-board__search input[type="search"] {
  font-size: 13px;
}

.fn-ui .fn-board__table th {
  font-size: 12px;
  font-weight: 700;
}

.fn-ui .fn-board__sort {
  font-size: 12px;
  font-weight: 700;
}

.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: 12px;
}

.fn-ui .fn-board__status {
  font-size: 13px;
}

/* Magazine slot */
.fn-ui .fn-magazine__rail-label {
  font-size: 12px;
}

/* 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: 12px;
}

/* 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: 12px;
  }

  .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: 11px;
  }

  .fn-ui .fn-magazine__title {
    font-size: 16px;
  }

  .fn-ui .fn-view-switch__opt {
    font-size: 13px;
  }

  .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: 12px;
  }

  .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: 11px;
  }
}

@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%;
}
