/* Mobile editorial type scale, Figma 346:289 (24 November).
 * Load after page-specific styles so the same role has the same size everywhere.
 * Article prose and form inputs use the reading size; 12px is for short summaries.
 */
@media (max-width: 768px) {
  :root {
    --clvl-mobile-section-size: 30px;
    --clvl-mobile-card-size: 20px;
    --clvl-mobile-reading-size: 16px;
    --clvl-mobile-summary-size: 12px;
    --clvl-mobile-meta-size: 10px;
    --clvl-mobile-section-tracking: -1.7554px;
    --clvl-mobile-card-tracking: -.24px;
  }

  /* Public content, including the subscription dialog outside .layout. */
  body:not(.wp-admin) :is(.layout, .modal, .float-subscribe) {
    font-family: var(--v2-font);
    font-size: var(--clvl-mobile-reading-size);
    line-height: 1.5;
  }

  body:not(.wp-admin) :is(.layout, .modal, .float-subscribe) :is(
    .v2-h2,
    .v2-subscribe__title,
    .archive-heading__title,
    .page-header__title,
    .container__title,
    .team-archive__title,
    .team-profile__name,
    .author-page__name,
    .team-profile__articles-head h2,
    .story__title,
    .article__title,
    .article-hero__title,
    .text-page__title,
    .partners-v2__title,
    .partners-v2__h2,
    .offer-v2__title,
    .voices-library__head h2,
    .newsletter-widget__title,
    .newsletter-card__title
  ) {
    font: 500 var(--clvl-mobile-section-size)/1.2 var(--v2-font);
    letter-spacing: var(--clvl-mobile-section-tracking);
  }

  body:not(.wp-admin) :is(.layout, .modal, .float-subscribe) :is(
    .insight-lead__title,
    .insight-row__title,
    .insight-card__title,
    .news__title,
    .related-card__title,
    .team-article-card__title,
    .leader-v2__name,
    .leader-feature__name,
    .leader-card__name,
    .team-card__name,
    .author-card__name,
    .author-page__bio-title,
    .vision-card__title,
    .voices-featured__title,
    .voice-card__title,
    .event-card__title,
    .insight-download__name,
    .home-feature__title,
    .home-mediakit__title,
    .benefit-v2__title,
    .pair-v2__title,
    .process-v2__title,
    .offer-v2__best-label,
    .promo-card__title,
    .share-modal__title,
    .float-subscribe__title,
    .float-subscribe__news-title,
    .subscribe-success__title
  ) {
    font: 500 var(--clvl-mobile-card-size)/1.2 var(--v2-font);
    letter-spacing: var(--clvl-mobile-card-tracking);
  }

  body:not(.wp-admin) :is(.layout, .modal, .float-subscribe) :is(
    .archive-heading__description,
    .page-header__description,
    .home-hero__text,
    .home-leaders__text,
    .home-vision__eyebrow,
    .home-vision__text,
    .team-archive__intro-copy p,
    .team-profile__empty,
    .story__lead,
    .article-hero__deck,
    .partners-v2__lead,
    .partners-v2__text,
    .offer-v2__lead,
    .offer-v2__list,
    .approach-v2,
    .v2-subscribe__text,
    .newsletter-widget__description,
    .newsletter-card__description,
    .subscribe-success__text,
    .voices-page__header p
  ) {
    font: 400 var(--clvl-mobile-reading-size)/1.5 var(--v2-font);
    letter-spacing: normal;
  }

  body:not(.wp-admin) :is(.layout, .modal, .float-subscribe) :is(
    .insight-lead__text,
    .insight-row__text,
    .insight-card__description,
    .news__description,
    .related-card__text,
    .team-card__summary,
    .leader-v2__position,
    .leader-feature__role,
    .team-card__position,
    .author-card__role,
    .author-page__position,
    .vision-card__description,
    .vision-card__item-text,
    .voices-featured__excerpt,
    .voice-card__excerpt,
    .event-card__description,
    .insight-download__description,
    .home-feature__text,
    .home-mediakit__text,
    .benefit-v2__text,
    .pair-v2__text,
    .process-v2__text,
    .offer-v2__best-text,
    .promo-card__text,
    .float-subscribe__text
  ) {
    font: 500 var(--clvl-mobile-summary-size)/1.5 var(--v2-font);
    letter-spacing: -.12px;
  }

  /* All parts of an editorial byline share the 10px size, including links. */
  body:not(.wp-admin) :is(.layout, .modal, .float-subscribe) :is(
    .v2-kicker,
    .story__author,
    .story__date,
    .story__byline,
    .story__guest,
    .story__topics-label,
    .story__topic,
    .insight-featured__date,
    .insight-card__author,
    .insight-card__date,
    .insight-card__tag,
    .insight-card__category,
    .news__author,
    .news__date,
    .news__tag,
    .article__meta,
    .article__author,
    .article__date,
    .article__tag,
    .article-hero__category,
    .article-hero__meta,
    .team-article-card__meta,
    .team-profile__kicker,
    .author-page__edition,
    .leader-card__tag,
    .voices-featured__date,
    .voices-featured__host,
    .voices-featured__editorial,
    .voice-card__meta :where(time),
    .event-card__date,
    .event-card__location,
    .insight-download__type,
    .float-subscribe__news-label,
    .float-subscribe__news-date
  ) {
    font: 500 var(--clvl-mobile-meta-size)/1.6 var(--v2-font);
    letter-spacing: -.11px;
  }

  body:not(.wp-admin) :is(.layout, .modal, .float-subscribe) :is(
    .story__author,
    .news__author,
    .insight-card__author,
    .team-article-card__author,
    .article__author,
    .article-hero__author
  ) {
    font-weight: 600;
  }

  body:not(.wp-admin) :is(.layout, .modal, .float-subscribe) :is(
    .story__author,
    .news__author,
    .insight-card__author,
    .team-article-card__meta,
    .article__meta,
    .article-hero__meta,
    .voices-featured__host
  ) :is(a, span, strong, time) {
    font-size: inherit;
    line-height: inherit;
  }

  body:not(.wp-admin) :is(.layout, .modal, .float-subscribe) :is(
    .v2-btn,
    .button,
    .voices-library__filter,
    .team-profile__filter,
    .insights-page__tag,
    .editorial-tag,
    .v2-pagination,
    .pagination__page,
    .pagination__ellipsis,
    .team-profile__pagination .page-numbers,
    .share-modal__button,
    .newsletter-card__button,
    .float-subscribe__submit,
    .promo-card__cta,
    .clast-socials--sidebar :where(a),
    .story__socials :where(a)
  ) {
    font: 500 var(--clvl-mobile-summary-size)/1.5 var(--v2-font);
    letter-spacing: normal;
  }

  body:not(.wp-admin) .layout :is(.v2-section-head__button, .home-leaders__button) {
    font-weight: 700;
    min-height: 39px;
  }

  /* The rule and button align to the common 36px section-heading line. */
  body:not(.wp-admin) .layout .v2-section-head {
    align-items: center;
  }

  body:not(.wp-admin) .layout .v2-section-head__rule {
    margin-block: 0;
  }

  body:not(.wp-admin) .layout .v2-section-head__button {
    margin-block: 0;
  }

  /* Reading copy does not inherit the much smaller card-summary style. */
  body:not(.wp-admin) .layout :is(.story__body, .content, .team-profile__bio, .author-page__bio-content),
  body:not(.wp-admin) .layout :is(.story__body, .content, .team-profile__bio, .author-page__bio-content) :is(p, ul, ol, li, table, td, th) {
    font-family: var(--v2-font);
    font-size: var(--clvl-mobile-reading-size);
    line-height: 1.6;
  }

  /* Older editor blocks have explicit 18px inline sizes or WP preset classes.
   * Override only reading-copy sizes on mobile; preserve their other formatting.
   * !important is needed to beat inline styles and WordPress's preset utilities.
   */
  body:not(.wp-admin) .layout :is(.story__body, .content, .team-profile__bio, .author-page__bio-content)
  :is(p, ul, ol, li, td, th):is([style*="font-size"], [class*="-font-size"]) {
    font-size: var(--clvl-mobile-reading-size) !important;
  }

  body:not(.wp-admin) .layout :is(.story__body, .content, .team-profile__bio, .author-page__bio-content)
  :is(p, li, td, th) :is(span, strong, b, em, i, a):is([style*="font-size"], [class*="-font-size"]) {
    font-size: inherit !important;
  }

  body:not(.wp-admin) .layout :is(.story__body, .content, .team-profile__bio) :is(h1, h2) {
    font: 500 var(--clvl-mobile-section-size)/1.2 var(--v2-font);
    letter-spacing: var(--clvl-mobile-section-tracking);
  }

  body:not(.wp-admin) .layout :is(.story__body, .content, .team-profile__bio) :is(h3, h4, blockquote) {
    font: 500 var(--clvl-mobile-card-size)/1.3 var(--v2-font);
    letter-spacing: var(--clvl-mobile-card-tracking);
  }

  body:not(.wp-admin) .layout :is(.story__body, .content, .team-profile__bio) :is(h5, h6) {
    font: 500 var(--clvl-mobile-reading-size)/1.5 var(--v2-font);
    letter-spacing: normal;
  }

  body:not(.wp-admin) :is(.layout, .modal, .float-subscribe) :is(
    .v2-subscribe__input,
    .newsletter-widget__input,
    .newsletter-card__input,
    .float-subscribe__input,
    .share-modal__input
  ) {
    font: 400 var(--clvl-mobile-reading-size)/1.5 var(--v2-font);
  }

  body:not(.wp-admin) :is(.layout, .modal, .float-subscribe) :is(
    .v2-subscribe__consent,
    .v2-subscribe__feedback,
    .newsletter-widget__caption,
    .newsletter-widget__feedback,
    .newsletter-card__label,
    .newsletter-card__caption,
    .newsletter-card__feedback,
    .float-subscribe__caption,
    .float-subscribe__feedback,
    .subscribe-success__hint,
    .share-modal__subtitle,
    .site-footer__inner,
    .partners-v2__contacts,
    .team-profile__breadcrumbs,
    .story__body figcaption,
    .content figcaption
  ) {
    font: 400 var(--clvl-mobile-summary-size)/1.5 var(--v2-font);
    letter-spacing: normal;
  }

  body:not(.wp-admin) .layout .site-header__drawer-link {
    font: 500 var(--clvl-mobile-card-size)/1.3 var(--v2-font);
  }
}
