/* Shared reading roles. Relative units preserve the reader's default size. */
:root {
  --type-master:clamp(2.4375rem,5.5vw,5rem);
  --type-h1:clamp(1.9rem,3.25vw,2rem);
  --type-h2:clamp(1.3125rem,2.1vw,1.66rem);
  --type-h3:clamp(1.25rem,1.5vw,1.3125rem);
  --type-body:clamp(1rem,1.2vw,1.0625rem);
  --type-small:.875rem;
  --type-caption:.75rem;
  --leading-master:1.06;
  --leading-h1:1.15;
  --leading-h2:1.2;
  --leading-h3:1.3;
  --leading-body:1.55;
  --leading-small:1.4;
  --leading-caption:1.35;
}

/* The named layer owns text metrics ahead of legacy screen-specific rules.
   Roles cascade through inline links and emphasis without changing their weight. */
@layer reading-type {
  body {--text-step:var(--type-body);--text-leading:var(--leading-body)}
  :where(body,main,section,article,aside,header,footer,nav,form,fieldset,figure,div,
    p,blockquote,li,td,th,dt,dd,caption,figcaption,legend,label,output,summary,
    input,button,textarea,select,a,span,strong,b,em,small,time,h1,h2,h3,h4,h5,h6,code,pre):not(:where(svg *,[aria-hidden=true],[aria-hidden=true] *)) {
    font-size:var(--text-step)!important;
  }
  :where(main,main *):not(:where(svg *,[aria-hidden=true],[aria-hidden=true] *,#oracle,#oracle *)) {
    line-height:var(--text-leading)!important;
  }
  h1 {--text-step:var(--type-h1);--text-leading:var(--leading-h1)}
  h2 {--text-step:var(--type-h2);--text-leading:var(--leading-h2)}
  :is(h3,h4,h5,h6,.b8-grid strong) {--text-step:var(--type-h3);--text-leading:var(--leading-h3)}
  :is(label,button,input,select,textarea,table,.section-track62,
      .breadcrumbs,.b10-birth > summary) {--text-step:var(--type-small);--text-leading:var(--leading-small)}
  :is(small,time,figcaption,caption,.reading-time) {--text-step:var(--type-caption);--text-leading:var(--leading-caption)}
  :is(.oracle-hero h1,[data-reading-master] .b10-today h2,.cards-today > h2) {
    --text-step:var(--type-master);--text-leading:var(--leading-master)
  }
  .b10-today p {--text-step:var(--type-body);--text-leading:var(--leading-body)}
  .oracle-intro p {--text-step:var(--type-body)}
  a > span[aria-hidden=true]:only-child {font-size:var(--type-h2)!important}
  @media (min-width:761px) {
    .oracle-intro p {--text-step:var(--type-h3)}
    .oracle-hero button {--text-step:var(--type-body)}
  }
}
