/* Self-hosted Public Sans + Material Icons (see styles/fonts/LICENSES.md),
   replacing render-blocking fonts.googleapis.com links (also China-blocked). */

/* vietnamese */
@font-face {
  font-family: 'Public Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/styles/fonts/ps-ijwAs572Xtc6ZYQws9YVwnNDZpDyNjGolS673tpRgDcld1sPey7i3m4AWA.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
  font-family: 'Public Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/styles/fonts/ps-ijwAs572Xtc6ZYQws9YVwnNDZpDyNjGolS673tpRgDckd1sPey7i3m4AWA.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Public Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/styles/fonts/ps-ijwAs572Xtc6ZYQws9YVwnNDZpDyNjGolS673tpRgDcqd1sPey7i3m4.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* vietnamese */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/styles/fonts/ps-ijwRs572Xtc6ZYQws9YVwnNJfJ7QwOk1Fig.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/styles/fonts/ps-ijwRs572Xtc6ZYQws9YVwnNIfJ7QwOk1Fig.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/styles/fonts/ps-ijwRs572Xtc6ZYQws9YVwnNGfJ7QwOk1.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* vietnamese */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/styles/fonts/ps-ijwRs572Xtc6ZYQws9YVwnNJfJ7QwOk1Fig.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/styles/fonts/ps-ijwRs572Xtc6ZYQws9YVwnNIfJ7QwOk1Fig.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/styles/fonts/ps-ijwRs572Xtc6ZYQws9YVwnNGfJ7QwOk1.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* vietnamese */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/styles/fonts/ps-ijwRs572Xtc6ZYQws9YVwnNJfJ7QwOk1Fig.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/styles/fonts/ps-ijwRs572Xtc6ZYQws9YVwnNIfJ7QwOk1Fig.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/styles/fonts/ps-ijwRs572Xtc6ZYQws9YVwnNGfJ7QwOk1.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* fallback */
@font-face {
  font-family: 'Material Icons';
  font-display: block;
  font-style: normal;
  font-weight: 400;
  src: url("/styles/fonts/material-icons.woff2") format('woff2');
}

.material-icons {
  /* icon font must never fall back to a text font */
  /* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  overflow-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

:root {
  /* grid */
  --grid-container-width: 83.4%;
  --grid-column-width: calc(var(--grid-container-width) / 12);

  /* spacing */
  --spacing-xxl: 48px;
  --spacing-xl: 32px;
  --spacing-l: 24px;
  --spacing-m: 12px;
  --spacing-s: 8px;
  --spacing-xs: 4px;

  /* color schemes */
  color-scheme: light;

  /* color tokens */
  --color-gray-100: #f1f1f1;
  --color-gray-500: #7d7d7d;
  --color-gray-800: #313131;
  --color-gray-900: #1b1b1b;
  --color-magenta-500: #eb00a5;
  --color-magenta-600: #bd0084;
  --color-red-300: #ff9990;
  --color-red-600: #c71000;

  /* named colors */
  --color-light-base: 255 255 255;
  --color-dark-base: 0 0 0;
  --color-light: rgb(255 255 255);
  --color-dark: rgb(0 0 0);
  --color-text: light-dark(var(--color-dark), var(--color-light));
  --color-link: light-dark(var(--nsw-link), var(--nsw-link-light));
  --color-accent: light-dark(var(--color-magenta-600), var(--color-magenta-500));
  --color-background: light-dark(var(--color-light), var(--color-dark));

  /* headings */
  --heading-font-size-xxl: 32.44px;
  --heading-font-size-xl: 28.83px;
  --heading-font-size-l: 25.63px;
  --heading-font-size-m: 22.78px;
  --heading-font-size-s: 20.25px;
  --heading-font-size-xs: 18px;
  --heading-line-height: 1.15;

  /* body */
  --body-font-size-xl: 20px;
  --body-font-size-m: 16px;
  --body-line-height: 1.6;

  /* misc */
  --header-height: 64px;
}

.light-scheme {
  color-scheme: light;
}

.dark-scheme {
  color-scheme: dark;
}

html {
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: "Public Sans", "Trebuchet MS", sans-serif;
  font-size: var(--body-font-size-m);
  line-height: var(--body-line-height);
  padding: 0;

  &.no-header {
    --header-height: 0;

    margin: 0;
  }
}

header {
  display: none;
  width: 100%;
}

a {
  font-weight: var(--nsw-font-bold);
  color: var(--color-link);
  font-weight: var(--nsw-font-bold);


  &:focus-visible {
    outline: solid 3px var(--nsw-focus);
    outline-offset: 0;
  }

  .dark-scheme &:focus-visible,
  .nsw-section--invert &:focus-visible {
    outline-color: var(--nsw-focus-light);
  }

  &.btn {
    display: inline-block;
    line-height: 1;
    font-weight: 500;
    text-decoration: none;
    border: 2px solid;
    padding: 8px 12px;
    box-sizing: border-box;

    &.btn-outline {
      background: transparent;
    }
  }

  &.btn-accent {
    color: #fff;
    background: var(--color-accent);
    border: 2px solid var(--color-accent);

    &.btn-outline {
      color: var(--color-accent);
    }
  }

  &.btn-primary {
    color: var(--color-background);
    background-color: var(--color-text);

    &.btn-outline {
      color: var(--color-text);
      background: transparent;
    }
  }

  &.btn-secondary {
    color: var(--color-background);
    background-color: var(--color-gray-500);
    border: 2px solid var(--color-gray-500);

    &.btn-outline {
      color: var(--color-gray-500);
    }
  }

  &.btn-negative {
    color: #fff;
    background-color: var(--color-red-600);
    border: 2px solid var(--color-red-600);

    &.btn-outline {
      color: var(--color-red-600);
    }
  }
}

/* sections */
.section {
  --top-bottom-spacing: 0;
  --section-container-width: var(--grid-container-width);

  display: block;
  padding: var(--top-bottom-spacing) 0;

  &.grid-2 { --grid-size: 2; }
  &.grid-3 { --grid-size: 3; }
  &.grid-4 { --grid-size: 4; }
  &.grid-5 { --grid-size: 5; }
  &.grid-6 { --grid-size: 6; }
  &.gap-xs { --gap-spacing: var(--spacing-xs); }
  &.gap-s { --gap-spacing: var(--spacing-s); }
  &.gap-m { --gap-spacing: var(--spacing-m); }
  &.gap-l { --gap-spacing: var(--spacing-l); }
  &.gap-xl { --gap-spacing: var(--spacing-xl); }
  &.gap-xxl { --gap-spacing: var(--spacing-xxl); }
  &.spacing-xs { --top-bottom-spacing: calc(var(--spacing-xs) * 2); }
  &.spacing-s { --top-bottom-spacing: calc(var(--spacing-s) * 2); }
  &.spacing-m { --top-bottom-spacing: calc(var(--spacing-m) * 2); }
  &.spacing-l { --top-bottom-spacing: calc(var(--spacing-l) * 2); }
  &.spacing-xl { --top-bottom-spacing: calc(var(--spacing-xl) * 2); }
  &.spacing-xxl { --top-bottom-spacing: calc(var(--spacing-xxl) * 2); }

  &.grid .block-content {
    display: grid;
    gap: var(--gap-spacing);
  }

  &.center .default-content {
    text-align: center;
  }

  > .default-content {    
    margin: 0 16px;
    margin-bottom: calc(var(--top-bottom-spacing) / 3);

    > *:first-child {
      margin-top: 0;
    }

    > *:last-child {
      margin-bottom: 0;
    }
  }

  &.container {
    .default-content,
    .block-content {
      max-width: var(--section-container-width);
      margin-inline: auto;
    }

    &.container-2 { --section-container-width: calc(var(--grid-column-width) * 4); }
    &.container-4 { --section-container-width: calc(var(--grid-column-width) * 8); }
    &.container-6 { --section-container-width: var(--grid-container-width); }
  }

  &.layout-bento .block-content {
    --grid-container-width: 83.4%;

    display: grid;
    gap: var(--gap-spacing);
    grid-template-columns: 1fr;
  }
}

@media (width >= 600px) {
  .section.grid-2 .block-content {
    display: grid;
    grid-template-columns: repeat(var(--grid-size), 1fr);
  }
}

@media (width >= 900px) {
  .section {
    &.grid-4 .block-content,
    &.grid-6 .block-content {
      display: grid;
      grid-template-columns: repeat(calc(var(--grid-size) / 2), 1fr);
    }

    &.container.container-4 { --section-container-width: calc(var(--grid-column-width) * 4); }
    &.container.container-6 { --section-container-width: calc(var(--grid-column-width) * 6); }
  }

  .section.layout-bento .block-content {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
      "one one two"
      "one one three"
      "four five five";

    > *:nth-child(1) { grid-area: one; }
    > *:nth-child(2) { grid-area: two; }
    > *:nth-child(3) { grid-area: three; }
    > *:nth-child(4) { grid-area: four; }
    > *:nth-child(5) { grid-area: five; }
    > *:nth-child(6) { grid-area: six; }
  }
}

@media (width >= 1200px) {
  .section.grid .block-content {
    display: grid;
    grid-template-columns: repeat(var(--grid-size), 1fr);
  }
}

main:focus {
  outline: none;
}

main {
  overflow-x: clip;

  ul,
  ol {
    padding-inline-start: 24px;

    /* Reduce nested lists even further */
    ul,
    ol {
      padding-inline-start: 12px;
    }
  }
}

button {
  cursor: pointer;
}

li {
  margin-block: 1em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: var(--heading-line-height);
}

h1 { font-size: var(--heading-font-size-xxl); }
h2 { font-size: var(--heading-font-size-xl); }
h3 { font-size: var(--heading-font-size-l); }
h4 { font-size: var(--heading-font-size-m); }
h5 { font-size: var(--heading-font-size-s); }
h6 { font-size: var(--heading-font-size-xs); }

strong {
  font-weight: 600;
}

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

input,
textarea,
select {
  color-scheme: light;
}

img {
  width: 100%;
  height: auto;
}

svg {
  width: 20px;
  height: 20px;
}

@media (width >= 1440px) {
  :root {
    --grid-container-width: 1200px;
  }
}

main > div,
.has-template,
div[data-status] {
  display: none;
}

/* The page-level NSW layout wraps decorated sections in a .nsw-container after
   load; it must stay visible despite the undecorated-content guard above. */
main > .nsw-container {
  display: block;
}

aem-sidekick {
  opacity: 0;

  &[open="true"].is-ready {
    opacity: 1;
  }
}

/* NSW section vertical rhythm — must live here, not in the block CSS: da.live's
   authoring preview strips the section-metadata block into data-* attributes, so
   blocks/section-metadata/section-metadata.css is never loaded there. */
.section.nsw-section {
  --top-bottom-spacing: 1rem;
}

.layout-two-column-left .default-content, 
.layout-two-column-right .default-content, 
.layout-two-column-left .block-content, 
.layout-two-column-right .block-content  {  
    padding: 0 1rem;
}

.layout-full-width-main .default-content  {  
    padding: 0;
}

@media (width >= 48rem) {
  .section.nsw-section {
    --top-bottom-spacing: 2rem;
  }

  .layout-two-column-left .default-content, 
  .layout-two-column-right .default-content,
  .layout-two-column-left .block-content, 
  .layout-two-column-right .block-content  {  
    padding: 0 2rem;
  }

  .layout-full-width-main .default-content  {  
      padding: 0;
  }
}

.section.nsw-section--half-padding {
  --top-bottom-spacing: 0.5rem;
}

@media (width >= 48rem) {
  .section.nsw-section--half-padding {
    --top-bottom-spacing: 1rem;
  }
}

.section.nsw-section--no-padding {
  --top-bottom-spacing: 0;
}

/* Section text follows the scheme section-metadata sets; site-wide so the author preview gets it. */
.section > * {
  color: light-dark(var(--color-dark), var(--color-light));
}

/* Purple default (html:root outranks block-loaded NSW :root), grey per section, chrome stays purple. */
html:root,
.section.dei-purple-theme,
header,
footer,
.main-nav,
.side-nav,
.breadcrumb {
  --nsw-brand-dark: #441170;
  --nsw-brand-light: #e6e1fd;
  --nsw-brand-supplementary: #8055f1;
  --nsw-brand-accent: #cebfff;

  /* Link and state colours derived from brand-dark with the NSW theme formulas, as SWS themes do. */
  --nsw-link: var(--nsw-brand-dark);
  --nsw-hover: rgb(68 17 112 / 10%);
  --nsw-active: rgb(68 17 112 / 20%);
  --nsw-focus: #351bb5;
  --nsw-visited: #8a3866;
  --nsw-disabled: #a288b8;
}

.section.dei-grey-theme {
  --nsw-brand-dark: #22272b;
  --nsw-brand-light: #ebebeb;
  --nsw-brand-supplementary: #495054;
  --nsw-brand-accent: #cdd3d6;
  --nsw-link: var(--nsw-brand-dark);
  --nsw-hover: rgb(34 39 43 / 10%);
  --nsw-active: rgb(34 39 43 / 20%);
  --nsw-focus: #455657;
  --nsw-visited: #474747;
  --nsw-disabled: #909395;

  /* Re-substitute the body link token here so it picks up the grey --nsw-link. */
  --color-link: light-dark(var(--nsw-link), var(--nsw-link-light));
}

.section.section--full-bg {
  background-color: var(--section-bg-color);
}

main > .nsw-container .section.section--full-bg {
  position: relative;
  background-color: transparent;
}

main > .nsw-container .section.section--full-bg::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block: 0;
  left: calc(50% - 50vw);
  width: 100vw;
  background-color: var(--section-bg-color);
}

/* Background images: also site-wide for the stripped authoring preview. */
.section.has-background {
  position: relative;
}

.section.has-background .default-content,
.section.has-background .block-content {
  position: relative;
}

.section picture.section-background {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
}

.section .section-background img {
  object-fit: cover;
  height: 100%;
  width: 100%;
}

.external-icon {
  margin-left: 0.2rem;
  vertical-align: text-bottom;
  font-weight: inherit;
  font-size:inherit
}

/* Image width options, usable on any block: e.g. Cards (image-medium, image-center).
   Cover images (columns image-cover) always fill their column. */
[data-block-name].image-small {
  --block-image-width: 25%;
}

[data-block-name].image-medium {
  --block-image-width: 50%;
}

[data-block-name].image-large {
  --block-image-width: 75%;
}

:is(.image-small, .image-medium, .image-large)[data-block-name] picture:not(.cover-image *) img {
  max-width: var(--block-image-width);
}

[data-block-name].image-center picture:not(.cover-image *) img {
  margin-inline: auto;
}

/* Image aspect ratio option, usable on any block: e.g. Cards (image-4-3), authored
   as "image 4:3". Images are cropped to fill a 4:3 frame; cover images keep theirs.
   Matches bare <img> too: blocks fed from content fragments (school-profile) add
   images without a <picture> wrapper. */
[data-block-name].image-4-3 img:not(.cover-image *) {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  height: auto;
}
