/* Page accent (inc/page-accent.php), 2026-10-04: two-colour headings on every page, like the EQCM NEXT monograph.
   The serif italic half of a heading takes the page colour (--pa), mixed with the colour of the text around it
   (currentColor is the inherited ink): lighter on the night covers, darker on paper, always readable.
   The short bar before a section label carries the same colour. Device monographs keep their own accents (mono.css). */

:where(:root){--pa:#0885B2;--pa-mix:66%} /* defaults only: the page colour is printed in <head> (inc/page-accent.php) */

/* Italic half of the headings */
body:not(.editorial-mono) :is(h1,h2,h3,h4) em,
body:not(.editorial-mono) :is(.dv-h1-serif,.nx-h1-serif,.oq-topics a em,.papers-count > p em,.application-question em,.folio-wordmark em,.voice-quote em){
  color:color-mix(in oklab,var(--pa) var(--pa-mix),currentColor)!important;
}
/* Very large display italics read lighter: a touch more of the accent */
body:not(.editorial-mono) :is(.nu-cover-title h1 em,.dv-h1-serif,.mg-cover h1 em,.ag-page-hero__title em,.oq-lab-cover h1 em,.oq-nb-cover h1 em,.ca-root h1 em){--pa-mix:72%}

/* The bar before section labels */
:is(.openqcm-site .ag-section__eyebrow,.dv-section-head > .dv-num,.bp-intro .dv-num,.dv-cover .dv-kicker,.section-no,.nu-folio + * .dv-num)::before{
  content:'';display:inline-block;width:22px;height:2px;margin:0 10px 0 0;vertical-align:middle;background:var(--pa);
}
.openqcm-site .ag-section__eyebrow::before{margin-top:-2px}

/* The section you are in: the menu's underline takes the page colour */
.desktop-nav a[aria-current]::after,.oq-bar nav a[aria-current]::after{background:color-mix(in oklab,var(--pa) 70%,currentColor)!important}

/* Journal pages: the details that used the fixed blue (links, years, counters, active chips) take the page colour too.
   Paper: mixed with the ink for 4.5:1; night surfaces: mixed with the light ink. */
body.openqcm-site{--blue:color-mix(in oklab,var(--pa) 68%,#132830);--blue-ink:color-mix(in oklab,var(--pa) 55%,#0b1a20);--blue-soft:color-mix(in srgb,var(--pa) 9%,transparent)}
.openqcm-site :is(.oq-mast,.ag-page-hero,.ag-hero,.ag-cta,.ag-leadmagnet,.oq-colophon,.footer,.oq-cover){--blue:color-mix(in oklab,var(--pa) 55%,#edf1ec);--blue-ink:color-mix(in oklab,var(--pa) 40%,#ffffff)}

/* The notebook and lab kickers draw their own short line: it takes the page colour. */
.oq-nb-kicker > span{background:var(--pa)!important;height:2px!important;width:22px!important}
