/* ==========================================================================
   FN 17 — Article typography
   --------------------------------------------------------------------------
   Production type for the article page. Always on.

   The Karantina + Open Sans trial that used to live here is retired.
   Udi's later direction is one family, Open Sans, for the whole product.
   That trial also sized the article for a condensed display face
   (H1 up to 52px, dek 16–19px at weight 400, body 21px). Those numbers
   contradict the hierarchy he then specified for Open Sans:

     article title     44px / 700   on a wide screen, fluid below
     article dek       28px / 700
     card / feed title 17px / 600   — homepage feed, not this file
     article body      21px / 400   on desktop, 18px on a phone

   The desktop body is 21px on purpose. The measure stays 38em, so a line
   still holds the same ~65 Hebrew characters — the line just gets wider in
   pixels as the type gets larger, and the empty bands beside the column
   close up. A phone has no spare width, so it stays at 18px.

   Homepage hero and feed sizes stay in 06-hero.css and 07-feed.css.
   A 44px title must not land on a small card. Tables inside a story stay
   on the compact data size so a fund table does not inherit 18px prose.
   ========================================================================== */

.fn-ui #articleTitle.aTit {
  font-family: var(--fn-font-display);
  font-size: var(--fn-type-display);
  font-weight: var(--fn-fw-bold);
  font-synthesis: none;
  line-height: var(--fn-leading-display);
  letter-spacing: 0;
  color: var(--fn-text-1);
  max-width: min(20em, 100%);
  margin-right: auto;
  margin-left: auto;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

@media (max-width: 767px) {
  .fn-ui #articleTitle.aTit,
  .fn-ui #articleSubTitle,
  .fn-ui #articleSubTitle.h2 {
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    text-align: right !important;
  }
}

.fn-ui #articleSubTitle,
.fn-ui #articleSubTitle.h2 {
  font-family: var(--fn-font-display);
  font-size: var(--fn-type-h2);
  font-weight: var(--fn-fw-bold);
  font-synthesis: none;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--fn-text-1);
  max-width: min(28em, 100%);
  margin-right: auto;
  margin-left: auto;
  text-wrap: pretty;
}

.fn-ui #articleCat {
  font-size: var(--fn-type-caption);
  font-weight: var(--fn-fw-semibold);
  letter-spacing: 0;
}

.fn-ui #articleDate {
  font-family: var(--fn-font-num);
  font-size: var(--fn-type-caption);
  font-weight: var(--fn-fw-regular);
  font-variant-numeric: tabular-nums;
  color: var(--fn-text-2);
  letter-spacing: 0;
}

.fn-ui #articleDesc,
.fn-ui .articleBotmDesc {
  font-family: var(--fn-font-ui);
  font-size: var(--fn-type-body-lg);
  font-weight: var(--fn-fw-regular);
  line-height: var(--fn-leading-prose);
  max-width: min(var(--fn-measure-prose), 100%);
  margin-right: auto;
  margin-left: auto;
}

.fn-ui #articleDesc p,
.fn-ui .articleBotmDesc p {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin: 0.75em 0 0;
}

.fn-ui #articleDesc p:first-child,
.fn-ui .articleBotmDesc p:first-child {
  margin-top: 0;
}

.fn-ui #articleDesc h2,
.fn-ui .articleBodyText h2 {
  font-family: var(--fn-font-display);
  font-size: var(--fn-type-h3);
  font-weight: var(--fn-fw-bold);
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--fn-text-1);
  margin: 1.15em 0 0.4em;
}

.fn-ui #articleDesc h3,
.fn-ui .articleBodyText h3 {
  font-family: var(--fn-font-display);
  font-size: var(--fn-type-body-lg);
  font-weight: var(--fn-fw-bold);
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--fn-text-1);
  margin: 1.05em 0 0.35em;
}

.fn-ui #articleDesc h4,
.fn-ui .articleBodyText h4 {
  font-family: var(--fn-font-ui);
  font-size: var(--fn-type-h4);
  font-weight: var(--fn-fw-semibold);
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--fn-text-1);
  margin: 1em 0 0.3em;
}

.fn-ui #articleDesc strong,
.fn-ui #articleDesc b {
  font-weight: var(--fn-fw-semibold);
}

.fn-ui #articleDesc a {
  text-underline-offset: 0.15em;
}

.fn-ui #articleDesc ul,
.fn-ui #articleDesc ol {
  margin: 0.6em 0 0;
  padding-inline-start: 1.25em;
}

.fn-ui #articleDesc li {
  margin: 0.28em 0;
  line-height: inherit;
}

.fn-ui #articleDesc blockquote {
  margin: 1em 0;
  padding: 0.15em 1em;
  border-right: 3px solid var(--fn-border-strong);
  color: var(--fn-text-2);
}

/* A story can embed a fund table. Keep it dense; the legacy template rule
   already forces 12px on cells with !important, and this matches that size
   while putting the cells on the numeric face. */
.fn-ui #articleDesc table,
.fn-ui #articleDesc table td,
.fn-ui #articleDesc table th,
.fn-ui #articleDesc table span {
  font-family: var(--fn-font-num);
  font-size: var(--fn-type-table-sm);
  font-weight: var(--fn-fw-regular);
  line-height: var(--fn-leading-data);
  font-variant-numeric: tabular-nums;
}

.fn-ui #articleSidbar .panel-heading,
.fn-ui #articleSidbar .fnt16 {
  font-family: var(--fn-font-display);
  font-weight: var(--fn-fw-semibold);
  letter-spacing: 0;
}

@media (max-width: 767px) {
  .fn-ui #articleTitle.aTit,
  .fn-ui #articleSubTitle,
  .fn-ui #articleSubTitle.h2,
  .fn-ui #articleDesc,
  .fn-ui .articleBotmDesc {
    max-width: none;
  }
}

/* Desktop reading size: 21px. In-story headings step up with the body so a
   subhead stays a subhead.
   On the article page the body takes the whole column, no 38em (798px) cap:
   capped, it left a white band on each side (about 60px each side next to
   the "more articles" sidebar, about 250px each side in a story with a table,
   which drops the sidebar), and the author and date, which sit at the
   column's edges, did not line up with the text under them. */
@media (min-width: 768px) {
  .fn-ui #articleDesc,
  .fn-ui .articleBotmDesc {
    font-size: 21px;
  }

  .fn-ui #articleContentPart #articleDesc,
  .fn-ui #articleContentPart .articleBotmDesc {
    max-width: none;
  }

  .fn-ui #articleDesc h2,
  .fn-ui .articleBodyText h2 {
    font-size: 26px;
  }

  .fn-ui #articleDesc h3,
  .fn-ui .articleBodyText h3 {
    font-size: 23px;
  }

  .fn-ui #articleDesc h4,
  .fn-ui .articleBodyText h4 {
    font-size: 21px;
  }
}
