/* NorthStar serif type system (option 4)
   Headlines: Playfair Display · Accent italics: Cormorant Garamond italic
   Labels, buttons, nav, badges: Marcellus SC · Everything else: Instrument Sans
   Loaded last on every page; the :not(#…) chain outranks older font rules. */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;1,500&family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500;1,600&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&family=Marcellus+SC&display=swap');

:root{--ns-serif-head:'Playfair Display',Georgia,serif;--ns-serif-body:'Instrument Sans',system-ui,-apple-system,'Segoe UI',sans-serif;--ns-serif-accent:'Cormorant Garamond',Garamond,Georgia,serif;--ns-serif-label:'Marcellus SC',Georgia,serif}

/* 1. Body text everywhere: Instrument Sans (clean SaaS sans, scaled up via font-size-adjust) */
html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5) body,
html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5) body *:not(code):not(pre):not(kbd):not(samp):not(svg):not(svg *){
  font-family:var(--ns-serif-body)!important;
  font-size-adjust:ex-height .55;   /* ~8% larger than Instrument Sans' native size, every text size scales up together */
  font-variant-numeric:lining-nums tabular-nums;
}
html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5) body :is(p,li,td,dd,input,textarea,select,small){font-weight:400;letter-spacing:-.003em}

/* 2. Headlines + brand: Playfair Display */
html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5) body :is(h1,h2,h3,h4,.brand,.flow strong),
html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5) body :is(h1,h2,h3,h4,.brand) *{
  font-family:var(--ns-serif-head)!important;
  font-size-adjust:none;
  font-weight:500!important;
  font-style:normal;
  letter-spacing:-.01em!important;
}

/* 3. Accent italic line inside headlines: Cormorant Garamond italic */
html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5):not(#s6):not(#s7) body :is(h1,h2) :is(span,em,i):not(.brand *){
  font-family:var(--ns-serif-accent)!important;
  font-style:italic!important;
  font-weight:600!important;
  font-size-adjust:none;
  font-size:1.1em;
  letter-spacing:0!important;
}
html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5) body .brand *{font-size:inherit}

/* 4. Labels, buttons, nav, badges, table headers: Marcellus SC */
html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5) body :is(button,.button,.btn,[role=button],[role=tab],[role=menuitem],nav a,label,th,.eyebrow,.tag,.tier,.chip,.ns-chips li,.number,[class*=badge],[class*=pill],[class*=eyebrow],[class*=kicker],legend,figcaption ol b),
html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5) body :is(button,.button,.btn,[role=button],[role=tab],[role=menuitem],nav a,.eyebrow,.tag,[class*=badge],[class*=pill]) *:not(svg):not(svg *):not(small):not(p):not(.nsn-is):not(.nb-d):not(.nb-t):not([class*=desc]):not([class*=sub]):not([class*=hint]){
  font-family:var(--ns-serif-label)!important;
  font-size-adjust:none;
  font-weight:400!important;
  font-style:normal;
}
html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5) body :is(.eyebrow,.tag,.number,[class*=eyebrow],[class*=kicker]){letter-spacing:.16em!important}

/* 5. Keep code monospace */
html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5) body :is(code,pre,kbd,samp){font-family:ui-monospace,Menlo,Consolas,monospace!important}

/* 6. Marcellus nav is wider: keep the homepage header on one line */
@media (max-width:1180px){html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5) body .iwv-built span{display:none}html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5) body .iwv-built{padding-left:12px}}
@media (max-width:1000px){html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5) body .nav{gap:14px}html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5) body .nav a{font-size:13px}}

/* 7. Big numbers (KPI counters, stats, chip counts): Playfair Display with lining figures */
html:root:not(#s1):not(#s2):not(#s3):not(#s4):not(#s5):not(#s6) body :is(.nsgl-grad,.stat-value,[class*=stat-value],[class*=kpi-value],[class*=metric-value],.nsx-count,[class*=td-stat] b,[class*=-stat] > b,.metric b,.ctr b){
  font-family:var(--ns-serif-head)!important;
  font-size-adjust:none;
  font-weight:500!important;
  font-variant-numeric:lining-nums tabular-nums;
  font-feature-settings:"lnum" 1,"tnum" 1;
  letter-spacing:-.01em!important;
}
