:root {
  /* brand */
  --color-black: #000;
  --color-white: #fff;

  /* accent (teal) */
  --color-teal-900: #00374c;
  --color-teal-700: #317485;
  --color-teal-500: #5da0b3;
  --color-teal-200: #d8e7e2;

  /* bright accent on dark surfaces: date squares, selected tab, focus rings, spinners */
  --color-accent: #4aadd1;

  /* grayscale */
  --color-gray-10: #e6e6e6;
  --color-gray-20: #ccc;
  --color-gray-30: #b3b3b3;
  --color-gray-40: #999;
  --color-gray-50: #808080;
  --color-gray-60: #666;
  --color-gray-70: #4d4d4d;
  --color-gray-80: #333;
  --color-gray-90: #191919;
  --color-gray-100: #000;

  /* semantic colors */
  --background-color: var(--color-white);
  --section-bg: #0a0a0a; /* default dark section surface */
  --light-color: var(--color-gray-10);
  --dark-color: var(--color-gray-80);
  --text-color: var(--color-black);
  --link-color: var(--color-teal-700);
  --link-hover-color: var(--color-teal-900);

  /* font families */
  --text-font-family: 'new-science', new-science-fallback, 'Anek Latin', arial, sans-serif;
  --font-family-base: 'new-science', 'Anek Latin', arial, sans-serif;
  --font-family-display: 'new-science-extended', var(--font-family-base);
  --nav-font-family: var(--font-family-base);

  /* font weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* type roles (Figma UAT, desktop @ 1280px) for new UI; existing headings,
     body copy and buttons keep the metrics further down */
  --type-heading-xxl-size: 64px;
  --type-heading-xxl-line-height: 1.25;
  --type-heading-xxl-tracking: -0.02em;
  --type-heading-xl-size: 48px;
  --type-heading-xl-line-height: 1;
  --type-heading-xl-tracking: -0.05em;
  --type-heading-l-size: 40px;
  --type-heading-l-line-height: 1.05;
  --type-heading-l-tracking: -0.05em;
  --type-heading-m-size: 32px;
  --type-heading-m-line-height: 1.2;
  --type-heading-m-tracking: -0.05em;
  --type-heading-s-size: 28px;
  --type-heading-s-line-height: 1.286;
  --type-heading-s-tracking: -0.05em;
  --type-body-l-size: 24px;
  --type-body-l-line-height: 1.333;
  --type-body-l-tracking: 0;
  --type-body-m-size: 16px;
  --type-body-m-line-height: 1.375;
  --type-body-m-tracking: -0.01em;
  --type-body-s-size: 14px;
  --type-body-s-line-height: 1.143;
  --type-body-s-tracking: -0.01em;
  --type-caption-size: 12px;
  --type-caption-line-height: 1.333;
  --type-caption-tracking: -0.02em;
  --type-caption-s-size: 11px;
  --type-caption-s-line-height: 1.364;
  --type-caption-s-tracking: 0.01em;
  --type-label-l-size: 16px;
  --type-label-l-line-height: 1.1875;
  --type-label-l-tracking: 0.05em;
  --type-label-m-size: 14px;
  --type-label-m-line-height: 1.357;
  --type-label-m-tracking: 0.03em;
  --type-label-s-size: 12px;
  --type-label-s-line-height: 1.333;
  --type-label-s-tracking: 0.03em;

  /* heading sizes (New Science) */
  --heading-font-size-xxl: 64px;
  --heading-font-size-xl: 56px;
  --heading-font-size-l: 48px;
  --heading-font-size-m: 40px;
  --heading-font-size-s: 32px;
  --heading-font-size-xs: 28px;
  --heading-font-size-xxs: 24px;

  /* display size (New Science Extended) */
  --heading-font-size-xxxl: 100px;

  /* heading line-heights (unitless, Figma line ÷ size) */
  --heading-line-height-xxl: 1.125;
  --heading-line-height-xl: 1.143;
  --heading-line-height-l: 1.208;
  --heading-line-height-m: 1.2;
  --heading-line-height-s: 1.1875;
  --heading-line-height-xs: 1.214;
  --heading-line-height-xxs: 1.208;
  --heading-line-height-xxxl: 0.9;

  /* heading tracking */
  --heading-tracking-display: -0.04em;
  --heading-tracking-headline: -0.02em;
  --heading-tracking-xxxl: -0.03em;

  /* body sizes */
  --body-font-size-l: 18px;
  --body-font-size-m: 16px;
  --body-font-size-s: 14px;
  --body-font-size-xs: 12px;

  /* spacing */
  --spacing-4: 4px;
  --spacing-8: 8px;
  --spacing-12: 12px;
  --spacing-16: 16px;
  --spacing-20: 20px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-40: 40px;
  --spacing-48: 48px;
  --spacing-64: 64px;
  --spacing-96: 96px;
  --spacing-128: 128px;

  /* radius */
  --radius-4: 4px;
  --radius-8: 8px;
  --radius-12: 12px;
  --radius-16: 16px;
  --radius-24: 24px;
  --radius-32: 32px;
  --radius-48: 48px;

  /* buttons */
  --button-font-family: var(--font-family-base);
  --button-font-size: 16px;
  --button-line-height: 21px;
  --button-letter-spacing: 0.16px;
  --button-padding: 22px 19px;
  --button-radius: var(--radius-8);
  --button-height: 56px;
  --button-disabled-opacity: 0.4;

  /* solid (primary) CTA on light surfaces */
  --button-solid-bg: var(--color-black);
  --button-solid-color: var(--color-white);
  --button-solid-hover-bg: var(--color-gray-80);

  /* outlined (secondary) CTA on light surfaces */
  --button-outlined-color: var(--color-black);
  --button-outlined-border: var(--color-black);
  --button-outlined-hover-bg: rgb(0 0 0 / 6%);

  /* CTAs on dark surfaces */
  --button-solid-bg-on-dark: var(--color-white);
  --button-solid-color-on-dark: #1d1d1d;
  --button-solid-hover-bg-on-dark: rgb(255 255 255 / 80%);
  --button-outlined-color-on-dark: var(--color-white);
  --button-outlined-border-on-dark: var(--color-white);
  --button-outlined-hover-bg-on-dark: rgb(255 255 255 / 10%);

  /* primary v2 CTA: translucent dark fill */
  --button-v2-bg: rgb(0 0 0 / 30%);
  --button-v2-hover-bg: rgb(0 0 0 / 50%);
  --button-v2-color: var(--color-white);

  /* small button */
  --button-small-font-size: 14px;
  --button-small-line-height: 19px;
  --button-small-letter-spacing: 0.14px;
  --button-small-height: 39px;

  /* header / nav */
  --nav-link-color: var(--color-black);
  --nav-link-font-size: 14px;
  --nav-link-line-height: 15px;
  --nav-link-letter-spacing: 0.14px;
  --nav-link-font-weight: var(--font-weight-regular);
  --nav-link-gap: var(--spacing-40);
  --nav-brand-width: 74px;
  --nav-height: 64px;

  /* bottom of the fixed header's nav pill; mirrors blocks/header/header.css */
  --nav-offset: calc(94 * clamp(0.7px, min(100vw / 402, 100svh / 874), 1px));
}

@media (width >= 900px) {
  :root {
    --heading-font-size-xxl: 56px;
    --heading-font-size-xl: 48px;
    --heading-font-size-l: 40px;
    --heading-font-size-m: 34px;
    --heading-font-size-s: 28px;
    --heading-font-size-xs: 24px;
    --heading-font-size-xxs: 22px;
    --nav-offset: calc(95 * clamp(0.8px, (min(100vw / 1728, 100svh / 1117) + 1px) / 2, 1px));
  }
}

/* fallback fonts */
@font-face {
  font-family: roboto-condensed-fallback;
  size-adjust: 88.82%;
  src: local('Arial');
}

@font-face {
  font-family: roboto-fallback;
  size-adjust: 99.529%;
  src: local('Arial');
}

/* Arial matched to New Science Extended widths so line breaks hold when the kit loads */
@font-face {
  font-family: new-science-extended-fallback;
  size-adjust: 134.5%;
  src: local('Arial');
}

/* Arial / Roboto matched to New Science widths and metrics until the kit loads */
@font-face {
  font-family: new-science-fallback;
  size-adjust: 106%;
  ascent-override: 103.8%;
  descent-override: 21.7%;
  line-gap-override: 0%;
  src: local('Arial'), local('Roboto'), local('Roboto-Regular');
}

body {
  display: none;
  margin: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--font-family-base);
  font-size: var(--body-font-size-m);
  line-height: 1.5;
  scrollbar-width: none; /* the page pages through sections with snap scroll */
}

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
  scrollbar-gutter: stable;
}

/* no native scroll until section snap is ready (scripts.js adds .snap-ready, with a timeout fallback) */
html:not(.snap-ready) {
  overflow: hidden;
}

html.snap-active.snap-locked {
  overflow: hidden;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body.appear {
  display: block;
}

footer .footer {
  visibility: hidden;
}

footer .footer[data-block-status="loaded"] {
  visibility: visible;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-display);
  font-weight: var(--font-weight-regular);
  scroll-margin: 40px;
}

/* fluid from a phone minimum at 360px wide to the desktop size at 1280px */
h1 {
  font-size: clamp(32px, 56px - (1280px - 100vw) * 24 / 920, 56px);
  line-height: var(--heading-line-height-xxl);
  letter-spacing: var(--heading-tracking-display);
}

h2 {
  font-size: clamp(28px, 48px - (1280px - 100vw) * 20 / 920, 48px);
  line-height: var(--heading-line-height-xl);
  letter-spacing: var(--heading-tracking-display);
}

h3 {
  font-size: clamp(24px, 40px - (1280px - 100vw) * 16 / 920, 40px);
  line-height: var(--heading-line-height-l);
  letter-spacing: var(--heading-tracking-headline);
}

h4 {
  font-size: clamp(22px, 34px - (1280px - 100vw) * 12 / 920, 34px);
  line-height: var(--heading-line-height-m);
  letter-spacing: var(--heading-tracking-headline);
}

h5 {
  font-size: clamp(20px, 28px - (1280px - 100vw) * 8 / 920, 28px);
  line-height: var(--heading-line-height-s);
  letter-spacing: var(--heading-tracking-headline);
}

h6 {
  font-size: clamp(18px, 24px - (1280px - 100vw) * 6 / 920, 24px);
  line-height: var(--heading-line-height-xs);
  letter-spacing: var(--heading-tracking-headline);
}

p,
dl,
ol,
ul,
pre,
blockquote {
  margin-top: 0.8em;
  margin-bottom: 0.25em;
  overflow-wrap: break-word; /* long words/URLs wrap instead of being clipped by the section */
}

code,
pre {
  font-size: var(--body-font-size-s);
}

pre {
  padding: 16px;
  border-radius: 8px;
  background-color: var(--light-color);
  overflow-x: auto;
  white-space: pre;
}

input,
textarea,
select,
button {
  font: inherit;
}

/* links */
a:any-link {
  color: var(--link-color);
  text-decoration: none;
  overflow-wrap: break-word;
}

a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

/* buttons */
p.button-wrapper {
  margin: 12px 0;
}

a.button:any-link,
button.button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 0;
  border: 1px solid transparent;
  border-radius: var(--button-radius);
  padding: var(--button-padding);
  font-family: var(--button-font-family);
  font-size: var(--button-font-size);
  font-weight: var(--font-weight-regular);
  line-height: var(--button-line-height);
  letter-spacing: var(--button-letter-spacing);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.button[aria-disabled="true"],
button.button:disabled {
  cursor: not-allowed;
  pointer-events: none;
  opacity: var(--button-disabled-opacity);
}

/* solid (primary) CTA */
a.button.primary,
button.button.primary {
  border-color: var(--button-solid-bg);
  background-color: var(--button-solid-bg);
  color: var(--button-solid-color);
}

a.button.primary:hover,
a.button.primary:focus-visible,
button.button.primary:hover,
button.button.primary:focus-visible {
  border-color: var(--button-solid-hover-bg);
  background-color: var(--button-solid-hover-bg);
  color: var(--button-solid-color);
}

a.button.primary[aria-disabled="true"],
a.button.primary[aria-disabled="true"]:hover,
a.button.primary[aria-disabled="true"]:focus-visible,
button.button.primary:disabled,
button.button.primary:disabled:hover,
button.button.primary:disabled:focus-visible {
  background-color: var(--light-color);
  border-color: var(--light-color);
  color: var(--dark-color);
}

/* outlined (secondary) CTA: on-dark by default, Light Mode swaps in on-light values */
a.button.secondary,
button.button.secondary {
  gap: 10px;
  border-color: var(--button-outlined-border-on-dark);
  background-color: transparent;
  color: var(--button-outlined-color-on-dark);
  text-transform: uppercase;
  transition: background-color 200ms ease;
}

a.button.secondary:hover,
a.button.secondary:focus-visible,
button.button.secondary:hover,
button.button.secondary:focus-visible {
  border-color: var(--button-outlined-border-on-dark);
  background-color: var(--button-outlined-hover-bg-on-dark);
  color: var(--button-outlined-color-on-dark);
}

a.button.secondary[aria-disabled="true"],
a.button.secondary[aria-disabled="true"]:hover,
a.button.secondary[aria-disabled="true"]:focus-visible,
button.button.secondary:disabled,
button.button.secondary:disabled:hover,
button.button.secondary:disabled:focus-visible {
  background-color: var(--light-color);
  border-color: var(--light-color);
  color: var(--dark-color);
}

main .section.light-mode a.button.secondary,
main .section.light-mode button.button.secondary {
  border-color: var(--button-outlined-border);
  color: var(--button-outlined-color);
}

main .section.light-mode a.button.secondary:hover,
main .section.light-mode a.button.secondary:focus-visible,
main .section.light-mode button.button.secondary:hover,
main .section.light-mode button.button.secondary:focus-visible {
  border-color: var(--button-outlined-border);
  background-color: var(--button-outlined-hover-bg);
  color: var(--button-outlined-color);
}

@media (width < 900px) {
  #onetrust-banner-sdk #onetrust-policy-text,
  #onetrust-banner-sdk #onetrust-policy-text * {
    font-size: 12px !important;
    line-height: 1.45 !important;
  }
}

/* CTA glitch hover (scripts/utils/glitch.js) */
.glitch .glitch-char.is-dim {
  opacity: 0.22;
}

/* primary v2 CTA: bold + italic link, or any primary button in a "Primary V2 Buttons" section */
a.button.primary-v2,
button.button.primary-v2,
main .section.primary-v2-buttons a.button.primary,
main .section.primary-v2-buttons button.button.primary {
  justify-content: space-between;
  gap: var(--spacing-16);
  min-width: 176px;
  height: 49px;
  padding: 7px 7px 7px 12px;
  border-color: transparent;
  background-color: var(--button-v2-bg);
  color: var(--button-v2-color);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background-color 200ms ease;
}

a.button.primary-v2::after,
button.button.primary-v2::after,
main .section.primary-v2-buttons a.button.primary::after,
main .section.primary-v2-buttons button.button.primary::after {
  content: '';
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  background-color: currentcolor;
  mask: url('../icons/plus.svg') center / 100% no-repeat;
}

a.button.primary-v2:hover,
a.button.primary-v2:focus-visible,
button.button.primary-v2:hover,
button.button.primary-v2:focus-visible,
main .section.primary-v2-buttons a.button.primary:hover,
main .section.primary-v2-buttons a.button.primary:focus-visible,
main .section.primary-v2-buttons button.button.primary:hover,
main .section.primary-v2-buttons button.button.primary:focus-visible {
  border-color: transparent;
  background-color: var(--button-v2-hover-bg);
  color: var(--button-v2-color);
}

a.button.primary-v2:focus-visible,
button.button.primary-v2:focus-visible,
main .section.primary-v2-buttons a.button.primary:focus-visible,
main .section.primary-v2-buttons button.button.primary:focus-visible {
  outline: 2px solid var(--button-v2-color);
  outline-offset: 2px;
}

a.button.primary-v2[aria-disabled="true"],
button.button.primary-v2:disabled,
main .section.primary-v2-buttons a.button.primary[aria-disabled="true"],
main .section.primary-v2-buttons button.button.primary:disabled {
  background-color: var(--button-v2-bg);
  color: var(--button-v2-color);
}

main img {
  max-width: 100%;
  width: auto;
  height: auto;
}

.icon {
  display: inline-block;
  height: 24px;
  width: 24px;
}

.icon img {
  height: 100%;
  width: 100%;
}

/* section snap-scroll paging */
main > .section {
  /* exactly one viewport tall so every snap travels the same distance */
  height: 100vh;
  height: 100svh;
  background-color: var(--section-bg);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
}

main > .section > div {
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
  margin: auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

main > .section:first-of-type {
  margin-top: 0;
}

/* Text Alignment (section field): default content only, blocks keep their own layout */
main > .section.text-align-left > .default-content-wrapper {
  text-align: left;
}

main > .section.text-align-center > .default-content-wrapper {
  text-align: center;
}

main > .section.text-align-right > .default-content-wrapper {
  text-align: right;
}

/* snapping section of text only, taller than the screen below the header (section-snap.js):
   the text scrolls inside the section, starting below the header */
html.snap-active main > .section.has-text-scroll {
  justify-content: flex-start;
  padding-top: var(--nav-offset);
}

html.snap-active main > .section.has-text-scroll > .default-content-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 auto;
  padding-bottom: clamp(20px, 5vw, 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* section styles: Light Mode and Spotlight are kept but not offered in models/_section.json */
main .section.light-mode {
  background-color: var(--light-color);
  margin: 0;
  padding: 40px 0;
  color: var(--text-color);
}

main .section.light-mode h1,
main .section.light-mode h2,
main .section.light-mode h3,
main .section.light-mode h4,
main .section.light-mode h5,
main .section.light-mode h6,
main .section.light-mode p {
  color: var(--text-color);
}

main .section.spotlight {
  margin: 0;
  padding: 72px 0 0;
  text-align: center;
}

main .section.spotlight h1,
main .section.spotlight h2,
main .section.spotlight h3 {
  color: var(--color-white);
  text-transform: uppercase;
}

main .section.spotlight p {
  color: var(--color-gray-30);
}

/* No Snap: free-scrolls and grows to fit its content */
main > .section.no-snap {
  height: auto;
  min-height: 100vh;
  min-height: 100svh;
  overflow: visible;
}

/* reduced motion turns snap off, so sections free-scroll at natural height */
@media (prefers-reduced-motion: reduce) {
  main > .section {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    overflow: visible;
  }
}

/* Universal Editor: size sections to content so authors can reach every field */
body:has([data-aue-resource]) main > .section {
  height: auto;
  min-height: auto;
  overflow: visible;
}

/* standalone fragment previews (scripts.js) */
body.fragment-preview main > .section {
  height: auto;
  min-height: auto;
  overflow: visible;
}

/* Universal Editor: fixed height for full-viewport blocks (add new ones to the list);
   the footer is outside <main>, so it is listed separately */
body:has([data-aue-resource]) main :is(
    .hero,
    .register-form,
    .countdown,
    .columns.thank-you,
    .featured-intro,
    .events,
    .blog-listing,
    .featured-blogs,
  ),
body:has([data-aue-resource]) footer .footer {
  height: 900px;
  min-height: 0;
  overflow: hidden;
}

/* stops the footer's aspect-ratio widening the editor canvas */
body:has([data-aue-resource]) footer .footer {
  aspect-ratio: auto;
}

/* iOS/iPadOS 26 Safari draws content behind its translucent bars; cover them */
@supports (-webkit-touch-callout: none) {
  html,
  body {
    background-color: var(--color-black);
  }

  .bar-cover {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9;
    width: 100%;
    height: 100vh;
    height: 100svh;
    transform: translateY(var(--bar-cover-y, 0));
    pointer-events: none;

    &::before,
    &::after {
      content: '';
      position: absolute;
      right: 0;
      left: 0;
      background-color: var(--color-black);
    }

    &::before {
      bottom: 100%;
      height: var(--bar-cover-above, 0);
    }

    &::after {
      top: 100%;
      height: var(--bar-cover-below, 0);
    }

    /* a No Snap section is on screen (section-snap.js) */
    &.is-off {
      display: none;
    }
  }
}
