/* ==========================================================================
   Type settings, switched from the "Type" panel (assets/js/type-lab.js).
   Each setting is a data-* attribute on <html>; with none set, the site is
   exactly as designed. Shared by the homepage, Field Notes (site.css) and the
   case studies (case.css), so both sets of size tokens are covered.
   ========================================================================== */

/* --- scale: display / lead / body / small -------------------------------- */
/* current      32 · 22 · 16 · 14   matched to lausandoval.com (default)
   grid         32 · 24 · 16 · 14   lead on the 4-pt grid
   third        40 · 24 · 16 · 14   steps of roughly a major third (1.25)
   large        48 · 24 · 16 · 14   a louder display size for titles     */
:root[data-tscale="grid"]{--fs-lead:24px;--fs-h2:24px}
:root[data-tscale="third"]{--fs-display:clamp(32px,2.8vw,40px);--fs-title:clamp(32px,2.8vw,40px);--fs-lead:24px;--fs-h2:24px}
:root[data-tscale="large"]{--fs-display:clamp(36px,3.4vw,48px);--fs-title:clamp(36px,3.4vw,48px);--fs-lead:24px;--fs-h2:24px}

/* --- leading on a 4-pt baseline: every line height rounds to a multiple of
   4px. Text ~1.45 (16/24, 14/20, 22/32, 24/36); titles tighter, ~1.15 rounded
   up (32/40, 40/48, 48/56). The pixel name and the ticker keep their own. ---- */
:root[data-tlh="grid"] :where(p,li,dd,dt,h2,h3,a,span,figcaption,blockquote){line-height:round(nearest,1.45em,4px)}
:root[data-tlh="grid"] :where(h1,.cover__title,.next__title,.fn-page__title,.cs-hero__title,.title){line-height:round(up,1.15em,4px)}
:root[data-tlh="grid"] :is(.footer-name,.footer-name *){line-height:.9}
:root[data-tlh="grid"] .marquee__item{line-height:1.2}

/* --- weights: Neue Montreal is loaded as Book (400) and Medium (500) only;
   a "bold" would be faked by the browser, so it isn't offered. ------------- */
:root[data-twworked="book"] .worked__row :is(.role,.org){font-weight:400}
:root[data-twworked="medium"] .worked__row :is(.role,.org){font-weight:500}
:root[data-twtitle="book"] :is(.cover__title,.fn-page__title,.cs-hero__title){font-weight:400}
:root[data-twtitle="medium"] :is(.cover__title,.fn-page__title,.cs-hero__title){font-weight:500}
:root[data-twproj="book"] .project__title{font-weight:400}
:root[data-twproj="medium"] .project__title{font-weight:500}
:root[data-twhead="book"] .content h2{font-weight:400}
:root[data-twhead="medium"] .content h2{font-weight:500}
:root[data-twnav="book"] :is(.navlink,.masthead .btn,.topbar nav a){font-weight:400}
:root[data-twnav="medium"] :is(.navlink,.masthead .btn,.topbar nav a){font-weight:500}
:root[data-twcredit="book"] :is(.colophon,.foot .end){font-weight:400}
:root[data-twcredit="medium"] :is(.colophon,.foot .end){font-weight:500}

/* --- the serif accent (Editorial New italic, used only for the Field Notes line) */
:root[data-tserif="off"] .fn-intro{font-family:var(--sans);font-style:normal;letter-spacing:-.03em}

/* --- universal weight: everything set in one weight ----------------------
   Bold is the real PP Neue Montreal Bold. There is no upright SemiBold file
   (only SemiBold Italic), so "semi-bold" is a preview: Medium, thickened by
   the browser (font-synthesis), until PPNeueMontreal-SemiBold.otf is added.
   The pixel name, the ticker and the serif accent keep their own faces. */
@font-face{font-family:"Neue Montreal";src:url("../fonts/neue-montreal-bold.otf") format("opentype");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Neue Montreal Semi";src:url("../fonts/neue-montreal-medium.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap}
:root[data-tuniversal] body :where(*):not(.footer-name, .footer-name *, .marquee__item, .tlab, .tlab *, .hlab, .hlab *, .lab, .lab *, .smo, .smo *, .rsw, .rsw *){font-weight:var(--tw)}
:root[data-tuniversal="book"]{--tw:400}
:root[data-tuniversal="medium"]{--tw:500}
:root[data-tuniversal="bold"]{--tw:700}
:root[data-tuniversal="semibold"]{--tw:600}
:root[data-tuniversal="semibold"] body :where(*):not(.footer-name, .footer-name *, .marquee__item, .tlab, .tlab *, .hlab, .hlab *, .lab, .lab *, .smo, .smo *, .rsw, .rsw *){
  font-family:"Neue Montreal Semi",var(--sans);font-synthesis:weight}
