/*
 * base typography, links, selection, focus, scrollbar.
 * Fonts: Inter for text, Space Grotesk for headings (loaded by the mu-plugin in place of Poppins).
 * Inline font-family:'Poppins' from page builders (Ultimate buttons etc.) is neutralised so it inherits.
 */
body.wt-site {
  font-family: var(--wt-font-body) !important;
  color: var(--wt-text);
  background-color: var(--wt-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01"; /* Inter: single-storey a, straight 1 */
}
body.wt-site :is(button, input, select, textarea, blockquote, .ubtn, a.action_button, #menu > ul > li > a, #overlay-menu ul li a, .hbspt-form) {
  font-family: var(--wt-font-body) !important;
}
/* plugin widgets that hard-code their own faces (service boxes, counters) */
body.wt-site :is(.svc_title, .svc_info, .stats-number, .counter_suffix, .counter_prefix, .ult-responsive.timer, .et-tabs, .et-tab-title, .et-tab-sub-title) {
  font-family: var(--wt-font-body) !important;
}
body.wt-site :is(.svc_title, .stats-number) {
  font-family: var(--wt-font-display) !important;
}
body.wt-site [style*="Poppins"] {
  font-family: inherit !important;
}

/* Every text element uses the design faces, whatever page content or plugins declare (one page ships
   `* { font-family: Poppins !important }`; widgets hard-code Raleway/Montserrat). Icon fonts are excluded by class.
   Specificity is kept low (one :not) so the heading rule below, which restores the display face, outranks it. */
:where(body.wt-site) *:not(i, [class*="icon"], [class*="fa-"], .fa, [class^="Defaults"], [class*=" Defaults"], [class*="vc_li"], .ab-icon) {
  font-family: var(--wt-font-body) !important;
}
body.wt-site :is(h1, h2, h3, h4, h5, h6, .svc_title, .stats-number) :not(i, [class*="icon"], [class*="fa-"], .fa, [class^="Defaults"], [class*=" Defaults"]) {
  font-family: var(--wt-font-display) !important;
}

/* Headings
   Specificity rule for site-wide defaults: `:where(body.wt-site) h2` is (0,0,1). It beats Betheme's bare `h2 {}`
   defaults (same specificity, loaded later) but loses to ANY class or inline style, so page-specific colours and
   sizes (white headings on coloured bands, .heading_fz, etc.) keep working. Only the typeface is forced. */
body.wt-site :is(h1, h2, h3, h4, h5, h6, .text-logo #logo, #Subheader .title, .aio-icon-title) {
  font-family: var(--wt-font-display) !important;
  text-wrap: balance;
}
:where(body.wt-site) :is(h1, h2, h3, h4, h5, h6) {
  font-weight: 600;
  color: var(--wt-ink);
}
:where(body.wt-site) h1 {
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
:where(body.wt-site) h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--wt-ink-2);
}
:where(body.wt-site) h3 {
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
:where(body.wt-site) h4 {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.3;
}
:where(body.wt-site) :is(h5, h6) {
  line-height: 1.35;
}
/* Space Grotesk is wide at 700+; cap bold inside headings at semibold */
:where(body.wt-site) :is(h1, h2, h3, h4, h5, h6) :is(strong, b) {
  font-weight: 600;
}

/* Body copy */
body.wt-site :where(#Content) :where(p, li) {
  line-height: 1.7;
  text-wrap: pretty;
}
body.wt-site :where(#Content p strong, #Content li strong) {
  font-weight: 600; /* colour inherits: bold text also sits on blue bands */
}

/* Default link colour: Betheme's dynamic CSS prints `a { color: #2275ac }` from Theme Options. Same specificity,
   printed later, so this wins while anything more specific (buttons, menus, cards) still does. */
:where(body.wt-site) a {
  color: var(--wt-blue);
}

/* Links in running text */
body.wt-site :where(#Content p a, #Content li a, .column_attr a) {
  color: var(--wt-blue);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--wt-fast) var(--wt-ease);
}
body.wt-site :where(#Content p a, #Content li a, .column_attr a):hover {
  color: var(--wt-blue-700);
}

body.wt-site ::selection {
  background: rgb(0 107 232 / 0.16);
  color: inherit;
}

/* Focus: visible for keyboard only */
body.wt-site :where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--wt-blue);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Breadcrumbs */
body.wt-site .fbc-page .fbc-items :is(a, li, span) {
  font-size: 14px;
  color: var(--wt-muted);
}
body.wt-site .fbc-page .fbc-items a:hover {
  color: var(--wt-blue);
}

/* Back to top: flat circle, bordered */
body.wt-site #back_to_top {
  border-radius: 50% !important;
  background: #fff !important;
  border: 1px solid var(--wt-line) !important;
  box-shadow: none !important;
  color: var(--wt-ink) !important;
  transition: border-color var(--wt-fast) var(--wt-ease), color var(--wt-fast) var(--wt-ease);
}
body.wt-site #back_to_top:hover {
  border-color: var(--wt-blue) !important;
  color: var(--wt-blue) !important;
}
body.wt-site #back_to_top i {
  color: inherit !important;
}

/* Scrollbar (the root scroller is <html>; gated on the body class) */
html:has(> body.wt-site) {
  scrollbar-width: thin;
  scrollbar-color: rgb(59 70 90 / 0.35) transparent;
}
html:has(> body.wt-site)::-webkit-scrollbar,
body.wt-site ::-webkit-scrollbar {
  width: 10px !important;
  height: 8px !important;
  background: transparent !important;
}
html:has(> body.wt-site)::-webkit-scrollbar-track,
body.wt-site ::-webkit-scrollbar-track {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html:has(> body.wt-site)::-webkit-scrollbar-thumb,
body.wt-site ::-webkit-scrollbar-thumb {
  background: rgb(59 70 90 / 0.35) !important;
  border: 2px solid transparent !important;
  border-radius: 999px !important;
  background-clip: padding-box !important;
  box-shadow: none !important;
}
html:has(> body.wt-site)::-webkit-scrollbar-button,
body.wt-site ::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Every real link shows the hand pointer, including on its child spans/images (legacy CSS and plugins set
   cursor:auto/default on some wrappers) */
body.wt-site a[href],
body.wt-site a[href] * {
  cursor: pointer;
}

/* Orange accent text that sits on a blue/dark band (marked by js/components/on-dark.js): white, readable */
body.wt-site #Wrapper .wt-on-dark-text {
  color: #fff !important;
}

/* Betheme offsets blockquote with position:relative; top:15px — it then overlaps whatever follows (e.g. the QMS "Download Brochure" button) */
body.wt-site blockquote {
  top: 0 !important;
  margin-top: 15px;
}
