/* Public reading templates. Roles are shared across pages and scoped away
   from book annotations, player controls and the account/workbench UI. */
@layer riix-reading-type {
  :root {
    --dx-type-title:28px;
    --dx-type-section:20px;
    --dx-type-group:18px;
    --dx-type-deck:16px;
    --dx-type-row:17px;
    --dx-type-reading:17px;
    --dx-type-meta:14px;
    --dx-type-side-row:16px;
    --dx-type-side-date:14px;
  }
  @media (max-width:959px) {
    :root {
      --dx-type-title:24px;
      --dx-type-section:18px;
      --dx-type-group:16px;
      --dx-type-deck:15px;
      --dx-type-row:15px;
      --dx-type-side-row:15px;
      --dx-type-side-date:12px;
    }
  }
  /* In the collection reader the article has its own viewport. */
  @media (min-width:701px) {
    .single-post { --dx-type-title:28px; --dx-type-section:20px; --dx-type-deck:16px; }
  }
  :where(h1.dx-article-title,.dx-mentor-titleline h1 .dx-mentor-service-name,
    .dx-search-page-title,.riix-pa-header h1,.rpk-heading-text h1) {
    font-size:var(--dx-type-title) !important;
    font-weight:500 !important;
    line-height:1.35 !important;
  }
  :where(.riix-pa-title-dot) {font-size:inherit !important;}
  /* Sentence list and expanded reading panel on handheld screens. */
  @media (max-width:680px), (max-width:959px) and (orientation:landscape) and (pointer:coarse) {
    #bk .bk-key-lesson { --dx-book-sentence-title-size:15px; }
    #bk .bk-key-lesson .bk-key-name,
    #bk .bk-key-lesson .bk-key-name > span { font-size:15px !important; }
    #bk .bk-key-panel .bk-key-quote {
      font-size:18px !important;
      line-height:1.5 !important;
    }
    #bk .bk-key-panel .bk-key-note,
    #bk .bk-key-note :is(p, li, blockquote, a, strong, em, b, i),
    #bk .bk-key-note a span:not([aria-hidden="true"]) {
      font-size:15px !important;
      line-height:1.7 !important;
    }
    #bk .bk-key-panel .bk-key-article-link,
    #bk .bk-key-article-link > span,
    #bk .bk-key-article-label,
    #bk .bk-key-article-label span {
      font-size:14px !important;
      line-height:1.5 !important;
    }
    #bk .bk-key-article-link .bk-key-article-arrow,
    #bk .bk-key-note a [aria-hidden="true"][class*="arrow"] {
      font-size:.9em !important;
      line-height:1 !important;
    }
  }
  /* The book title and homepage excerpt have separately approved sizes. */
  .bk-read h1.dx-article-title {font-size:30px !important;}
  @media (min-width:960px) {
    .bk-read h1.dx-article-title {font-size:32px !important;}
  }
  @media (min-width:901px) {
    .dx-quote-shell .dx-quote-text {font-size:32px !important;}
    .dx-section-heading-label {font-size:20px !important;line-height:1.35 !important;}
  }
  :where(.dx-mentor-hero-subtitle-copy,.riix-pa-subtitle,.riix-pa-subtitle > span,
    .dx-search-page-description,.single-post .dx-article-subtitle) {
    font-size:var(--dx-type-deck) !important;
    font-weight:400 !important;
    line-height:1.6 !important;
  }
  :where(.dx-mentor-section-title,.riix-sales-menu-rules summary h2,
    .dx-course-section-title,.dx-course-section-title > span,.dx-course-chapter-title,
    .dx-course-chapter-num,.dx-testimonial-section__summary h2,.dx-testimonial-section__summary h2 > span,
    .bk-directory-heading,.dx-riix-archive-title,.riix-pa-intro h2,.riix-pa-section-heading h2,
    .single-post .dx-prose :is(h2,h3),.rpk-intro h2) {
    font-size:var(--dx-type-section) !important;
    font-weight:500 !important;
    line-height:1.35 !important;
  }
  @media (max-width:959px) and (pointer:coarse) {
    .dx-riix-month-section-label { font-size:26px !important; }
  }
  :where(.dx-riix-year-title strong) {
    font-size:var(--dx-type-group) !important;
    font-weight:500 !important;
    line-height:1.4 !important;
  }
  :where(.dx-riix-article-title-text) {
    font-size:var(--dx-type-row) !important;
    font-weight:400 !important;
    line-height:1.5 !important;
  }
  /* The same archive becomes navigation when an article is open. */
  .dx-riixdesign.is-reading .dx-riix-archive-title {
    font-size:var(--dx-type-group) !important;
    line-height:1.4 !important;
  }
  .dx-riixdesign.is-reading :is(.dx-riix-year-title strong,.dx-riix-article-title-text) {
    font-size:var(--dx-type-side-row) !important;
  }
  .dx-riixdesign.is-reading :is(.dx-riix-date-label-sidebar,.dx-riix-article-date-reader,.dx-riix-group-count,
    .dx-riix-group-count > span,.dx-riix-group-update,.dx-riix-article-modified,.dx-riix-article-modified > span) {
    font-size:var(--dx-type-side-date) !important;
    font-weight:400 !important;
    line-height:1.4 !important;
  }
  .single-post .dx-prose :where(p,li) {
    font-size:var(--dx-type-reading) !important;
    line-height:1.75 !important;
  }
  :where(.dx-article-meta-text,.dx-article-image-caption,.riix-public-card-excerpt) {
    font-size:var(--dx-type-meta) !important;
    font-weight:400 !important;
  }
  .dx-article-meta-text {line-height:1.5 !important;}
  .riix-public-card-excerpt {line-height:1.6 !important;}
  :where(.riix-sales-menu-table,.mentor-two-table) :is(th,td) {
    font-size:var(--dx-type-row) !important;
  }
}

/* Each viewBox has different internal whitespace. These sizes give a
   chevron about half a label em of ink and a diagonal about the same span.
   Rotate/translate, focus, click areas and expanded states belong to each control. */
@layer riix-control-type {
  @media (max-width:680px), (max-width:959px) and (orientation:landscape) and (pointer:coarse) {
    #bk .bk-key-lesson .bk-key-meta-badge { font-size:12px !important; }
    #bk .bk-volume-toggle > .dx-interview-chapter-toggle-icon { --dx-action-arrow-box:.5em; }
  }
  @media (min-width:901px) {
    html .dx-top :is(.dx-navtrigger,.dx-account-trigger) {font-size:16px !important;}
  }
  :where(svg[data-riix-arrow="down"],.dx-navtrigger > .caret,.rpk-login-caret,.dx-account-caret,.dx-account-learning-menu-caret) {
    --dx-action-arrow-box:1em;
  }
  :where(#dxHomeHistoryToggle,#dxHomeLatestMoreToggle) > svg {--dx-action-arrow-box:.86em;}
  .riix-pa-level-trigger > svg {--dx-action-arrow-box:.75em;}
  svg[data-riix-arrow="diagonal"],.dx-read-full-btn .dx-read-full-arrow {--dx-action-arrow-box:.8em;}
  :where(.dx-course-chapter-toggle,.bk-volume-toggle) > .dx-interview-chapter-toggle-icon {--dx-action-arrow-box:.56em;}
  html :is(svg[data-riix-arrow="down"],svg[data-riix-arrow="diagonal"],.dx-navtrigger > .caret,.rpk-login-caret,.dx-account-caret,.dx-account-learning-menu-caret,
    #dxHomeHistoryToggle > svg,#dxHomeLatestMoreToggle > svg,.riix-pa-level-trigger > svg,
    .dx-read-full-btn .dx-read-full-arrow,:is(.dx-course-chapter-toggle,.bk-volume-toggle) > .dx-interview-chapter-toggle-icon) {
    font-size:inherit !important;
    width:var(--dx-action-arrow-box) !important;
    height:var(--dx-action-arrow-box) !important;
    flex:0 0 var(--dx-action-arrow-box) !important;
    align-self:center;
  }
  html .rpk-login-trigger > .rpk-login-caret {margin-inline-end:-.25em !important;}
  html .dx-read-full-btn .dx-read-full-arrow {margin-inline-end:-.15em !important;}
  html :is(#dxHomeHistoryToggle,#dxHomeLatestMoreToggle) > svg {margin-inline-end:-.18em !important;}
  html :is(:is(.riix-button,button,.dx-home-continue-all-link) .dx-pill-arrow-content > .dx-link-arrow-glyph,.dx-course-action-link .dx-course-action-trailing-icon,.dx-dropdown-menu-link .dx-account-new-window-arrow) {
    font-size:.8em !important;
  }
}
