/* LINK GLOBAL SCALE V23 — one full readability step larger across active pages */
:root{
  --link-v23-body:25px;
  --link-v23-card:23px;
  --link-v23-small:19px;
  --link-v23-control:22px;
  --link-v23-nav:18px;
  --link-v23-h1:clamp(58px,5.6vw,82px);
  --link-v23-h2:clamp(40px,4vw,58px);
  --link-v23-h3:clamp(28px,2.3vw,36px);
}

/* Normal readable copy */
body :where(p,li,dd,dt,blockquote){
  font-size:var(--link-v23-body)!important;
  line-height:1.55!important;
}

/* Cards, panels, descriptions and helper copy */
body :where(
  .card p,.card li,.panel p,.panel li,.tile p,.tile li,
  .description,.summary,.lead,.subhead,.subtitle,.helper,.help,.hint,
  .form-help,.form-note,.note,.details,.detail,.copy,.body-copy,
  [class*="card"] p,[class*="card"] li,[class*="panel"] p,[class*="panel"] li
){
  font-size:var(--link-v23-card)!important;
  line-height:1.5!important;
}

/* Small/meta/footer copy should still be comfortably readable */
body :where(
  small,.small,.meta,.eyebrow,.kicker,.overline,.caption,.legal,.fine-print,
  footer,footer p,footer li,footer a,[class*="footer"] p,[class*="footer"] a,
  [class*="meta"],[class*="caption"],[class*="eyebrow"],[class*="kicker"]
){
  font-size:var(--link-v23-small)!important;
  line-height:1.45!important;
}

/* Buttons, links that behave as buttons, and form controls */
body :where(
  button,.btn,[class*="btn"],[class*="button"],input,select,textarea,
  [role="button"],.back,.forward,.home-link,.nav-button
){
  font-size:var(--link-v23-control)!important;
  line-height:1.2!important;
}

body :where(button,.btn,[class*="btn"],[class*="button"],[role="button"]){
  min-height:52px!important;
  padding-top:13px!important;
  padding-bottom:13px!important;
}

/* Top navigation: one step larger without blowing up the header */
body :where(
  header nav a,.main-nav a,.site-nav a,.link-standard-nav a,
  .link-approved-header-v6 a,.link-v38-nav a,.link-nav a
){
  font-size:var(--link-v23-nav)!important;
}

/* Heading floors. Existing larger headings remain larger where their clamp wins. */
body h1{font-size:var(--link-v23-h1)!important;line-height:1.02!important;}
body h2{font-size:var(--link-v23-h2)!important;line-height:1.08!important;}
body h3{font-size:var(--link-v23-h3)!important;line-height:1.15!important;}

/* Opportunity/need/foundation/business cards that previously stayed tiny */
body :where(
  [class*="opportunity"] h3,[class*="need"] h3,[class*="funding"] h3,
  [class*="foundation"] h3,[class*="business"] h3,[class*="service"] h3
){
  font-size:clamp(28px,2.2vw,34px)!important;
}
body :where(
  [class*="opportunity"] p,[class*="need"] p,[class*="funding"] p,
  [class*="foundation"] p,[class*="business"] p,[class*="service"] p
){
  font-size:var(--link-v23-card)!important;
}

/* Admin/portal/editor tables and control text */
body :where(table,td,th,label,.tab,.tabs a,.toolbar,.toolbar button,.admin-nav a,.portal-nav a){
  font-size:var(--link-v23-small)!important;
}

/* Keep the visual editor usable and readable */
body.link-visual-manager,
body:has(#linkVisualPageManager){font-size:var(--link-v23-small)!important;}

@media (max-width:900px){
  :root{
    --link-v23-body:21px;
    --link-v23-card:20px;
    --link-v23-small:17px;
    --link-v23-control:19px;
    --link-v23-nav:16px;
    --link-v23-h1:clamp(44px,10vw,62px);
    --link-v23-h2:clamp(34px,8vw,48px);
    --link-v23-h3:clamp(26px,6vw,34px);
  }
}
