/* RedOwl site-wide type scale. Loaded on every page via @import at the top of res-mega.css.
   Only these styles exist: Display, H1, H2-H6, Body, Label, Caption. Inter only.
   Selectors use html:not(#_ts) body (id-level specificity) ... !important so they win over page and Apple layers. */
:root {
  --ts-display: clamp(2.75rem, 1.9rem + 2.4vw, 3.75rem);
  --ts-h1: clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem);
  --ts-h2: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);
  --ts-h3: clamp(1.375rem, 1.25rem + 0.5vw, 1.625rem);
  --ts-h4: 1.25rem;
  --ts-h5: 1.125rem; /* body 16px; captions 14px; all else larger */
  --ts-h6: 1.0625rem;
  --ts-body: 1rem;
  --ts-caption: 0.875rem;
}

html:not(#_ts) body, html:not(#_ts) body input, html:not(#_ts) body select, html:not(#_ts) body textarea, html:not(#_ts) body button {
  font-family: "Inter", system-ui, -apple-system, sans-serif !important;
}

/* Body */
html:not(#_ts) body { font-size: var(--ts-body); font-weight: 400; line-height: 1.6; }
html:not(#_ts) body p, html:not(#_ts) body li, html:not(#_ts) body td, html:not(#_ts) body dd, html:not(#_ts) body blockquote,
html:not(#_ts) body input, html:not(#_ts) body select, html:not(#_ts) body textarea {
  font-size: var(--ts-body) !important; font-weight: 400 !important; line-height: 1.6 !important; letter-spacing: 0 !important;
}
html:not(#_ts) body p strong, html:not(#_ts) body li strong, html:not(#_ts) body p b { font-weight: 600 !important; }

/* Headings */
html:not(#_ts) body h1, html:not(#_ts) body h2, html:not(#_ts) body h3, html:not(#_ts) body h4, html:not(#_ts) body h5, html:not(#_ts) body h6 {
  font-family: "Inter", system-ui, sans-serif !important; text-transform: none !important;
}
html:not(#_ts) body h1 { font-size: var(--ts-h1) !important; font-weight: 700 !important; line-height: 1.1 !important; letter-spacing: -0.03em !important; }
html:not(#_ts) body h2 { font-size: var(--ts-h2) !important; font-weight: 700 !important; line-height: 1.15 !important; letter-spacing: -0.025em !important; }
html:not(#_ts) body h3 { font-size: var(--ts-h3) !important; font-weight: 600 !important; line-height: 1.25 !important; letter-spacing: -0.015em !important; }
html:not(#_ts) body h4 { font-size: var(--ts-h4) !important; font-weight: 600 !important; line-height: 1.3 !important; letter-spacing: -0.01em !important; }
html:not(#_ts) body h5 { font-size: var(--ts-h5) !important; font-weight: 600 !important; line-height: 1.35 !important; letter-spacing: 0 !important; }
html:not(#_ts) body h6 { font-size: var(--ts-h6) !important; font-weight: 600 !important; line-height: 1.4 !important; letter-spacing: 0 !important; }
html:not(#_ts) body h1 *, html:not(#_ts) body h2 *, html:not(#_ts) body h3 * { font-size: inherit !important; font-weight: inherit !important; }

/* Display: metrics and highlighted figures */
html:not(#_ts) body .ts-display,
html:not(#_ts) body [class*="stat-num"], html:not(#_ts) body [class*="stat-value"], html:not(#_ts) body [class*="stat__num"],
html:not(#_ts) body [class*="kpi-value"], html:not(#_ts) body [class*="kpi-num"], html:not(#_ts) body [class*="metric-value"],
html:not(#_ts) body [class*="big-number"], html:not(#_ts) body [class*="-figure-num"], html:not(#_ts) body .counter,
html:not(#_ts) body [data-count], html:not(#_ts) body [data-countup] {
  font-size: var(--ts-display) !important; font-weight: 700 !important; line-height: 1 !important;
  letter-spacing: -0.035em !important; font-variant-numeric: tabular-nums;
}

/* Label: nav items, buttons, eyebrows, form labels */
html:not(#_ts) body .ts-label,
html:not(#_ts) body header nav a, html:not(#_ts) body .nav-link, html:not(#_ts) body .nav-links a, html:not(#_ts) body .mobile-menu a,
html:not(#_ts) body .btn, html:not(#_ts) body button, html:not(#_ts) body [class*="-btn"]:not(.social-icon-btn),
html:not(#_ts) body a[class*="button"], html:not(#_ts) body input[type="submit"],
html:not(#_ts) body label, html:not(#_ts) body [class*="eyebrow"], html:not(#_ts) body [class*="kicker"],
html:not(#_ts) body .section-chip, html:not(#_ts) body summary {
  font-size: var(--ts-body) !important; font-weight: 600 !important; line-height: 1.4 !important;
  letter-spacing: -0.005em !important; text-transform: none !important;
}

/* Caption: supporting, small and fine-print text */
html:not(#_ts) body .ts-caption,
html:not(#_ts) body small, html:not(#_ts) body figcaption, html:not(#_ts) body caption,
html:not(#_ts) body [class*="caption"], html:not(#_ts) body [class*="disclaimer"], html:not(#_ts) body [class*="fineprint"],
html:not(#_ts) body [class*="fine-print"], html:not(#_ts) body [class*="footnote"], html:not(#_ts) body [class*="hint"],
html:not(#_ts) body [class*="helper"], html:not(#_ts) body .form-note, html:not(#_ts) body .field-error, html:not(#_ts) body [class*="-meta"],
html:not(#_ts) body .res-mega p, html:not(#_ts) body .res-mega small, html:not(#_ts) body [class*="mega"] p,
html:not(#_ts) body footer p, html:not(#_ts) body footer li, html:not(#_ts) body footer small,
html:not(#_ts) body .ck-root p, html:not(#_ts) body p.ts-caption {
  font-size: var(--ts-caption) !important; font-weight: 400 !important; line-height: 1.5 !important; letter-spacing: 0 !important;
}
html:not(#_ts) body footer h3, html:not(#_ts) body footer h4, html:not(#_ts) body footer h5, html:not(#_ts) body footer h6 {
  font-size: var(--ts-body) !important; font-weight: 600 !important;
}

/* Small labels and tags: captions in sentence case (no tiny tracked capitals) */
html:not(#_ts) body .step-badge, html:not(#_ts) body .ro-tag, html:not(#_ts) body [class*="badge"]:not([class*="cert"]),
html:not(#_ts) body .award-category, html:not(#_ts) body [class*="tag"]:not(svg *), html:not(#_ts) body [class*="chip"] {
  font-size: var(--ts-caption) !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important;
}
html:not(#_ts) body .award-title { font-size: var(--ts-body) !important; font-weight: 600 !important; }

/* Card text (e.g. "Establish Leakage Baseline" steps) always uses Body size */
html:not(#_ts) body .process-step-item p, html:not(#_ts) body .process-step-item li,
html:not(#_ts) body .process-step-item .step-badge { font-size: var(--ts-body) !important; }

/* ===== Universal corner radius: buttons 24px, cards 12px, chips/fields 4px. Circles stay circular. ===== */
:root { --ur-sm: 24px; --ur-lg: 12px; }
html:not(#_r1):not(#_r2):not(#_r3) body :is(button, .btn, [class*="-btn"], a[class*="button"], 
  
  [class^="btn-"], [class*=" btn-"], .nav-item-contact a, .gps-link):not([class*="avatar"]):not([class*="dot"]):not([class*="circle"]):not([class*="round"]):not(.ck-switch):not([class*="social-icon"]):not([class*="play"]) {
  border-radius: var(--ur-sm) !important;
}
html:not(#_r1):not(#_r2):not(#_r3) body :is([class*="card"], [class*="panel"], [class*="tile"], .tile, .g, [class*="-box"], [class*="container"].glass-panel,
  .process-step-item, .persona-point-item, .award-item, .contact-channel-item, .breakdown-item, .tc-faq-item, details,
  .mega-menu, .modal, [class*="modal"], [role="dialog"] > div, .ck-banner, .specs, .rflag, .rpay, table,
  main img:not([src*="logo"]):not([src*="mark"]):not([class*="avatar"]):not([class*="owl"]), main video, iframe, figure, input, select, textarea, [class*="chip"], [class*="tag"]:not(svg *), [class*="badge"], [class*="pill"], .step-badge, .section-chip, .ck-row, .ck-banner, #mg-hero .mg-frag, #mg-hero .mg-out, .mg-anchor-txt, section.mg):not(#_x):not(.ck-switch):not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([class*="avatar"]):not([class*="circle"]):not([class*="round"]):not([class*="-btn"]):not(.btn):not(button) {
  border-radius: var(--ur-lg) !important;
}
html:not(#_r1):not(#_r2):not(#_r3) body :is(input, select, textarea, [class*="chip"], [class*="tag"]:not(svg *), [class*="badge"], [class*="pill"], .step-badge, .section-chip, .mg-anchor-txt):not(#_x):not(#_y):not(#_z):not(#_w):not(.ck-switch):not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([class*="avatar"]):not([class*="circle"]):not([class*="-btn"]):not(.btn):not(button) {
  border-radius: 4px !important;
}
