/* ==========================================================================
   cassiopeia_denri: Diatomaceous Earths project site (de.nri.org)
   Child of Cassiopeia. Loaded after Cassiopeia's template.css.
   ========================================================================== */

/* ---------- Fonts (Source Sans 3, OFL, self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url("../fonts/source-sans-3-latin-wght-italic.woff2") format("woff2-variations");
}

/* ---------- Tokens ---------- */
:root {
  /* Greens (based on the old site's #006600) */
  --de-green-950: #0a2e1c;
  --de-green-900: #0e3b24;
  --de-green-800: #144a2e;
  --de-green-700: #17613a;
  --de-green-600: #1f7a49;
  --de-green-200: #c9dccd;
  --de-green-100: #e1ece2;
  --de-green-50:  #f1f6f0;

  /* Amber: current page marker and focus outline on dark backgrounds */
  --de-amber-400: #f0b54a;
  --de-amber-300: #f6cb78;

  --de-ink:       #17211b;
  --de-ink-2:     #3f4c44;
  --de-rule:      #d6e0d6;
  --de-rule-2:    #e8eee7;
  --de-paper:     #ffffff;

  /* Source Sans 3 unless a font scheme is chosen in the template options. */
  --de-font-default: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --de-font: var(--cassiopeia-font-family-body, var(--de-font-default));
  --de-font-head: var(--cassiopeia-font-family-headings, var(--de-font));

  --de-wrap: 76rem;
  --de-gutter: clamp(1.25rem, 4vw, 2.5rem);
  --de-measure: 68ch;
  --de-radius: 3px;
  --de-ease: ease-out;
  --de-shadow: 0 1px 2px rgb(10 46 28 / .06), 0 8px 24px -6px rgb(10 46 28 / .18);

  /* Cassiopeia / Bootstrap variables */
  --cassiopeia-color-primary: var(--de-green-800);
  --cassiopeia-color-link: var(--de-green-700);
  --cassiopeia-color-hover: var(--de-green-900);
  --cassiopeia-scroll-margin-top: 1.5rem;
  --body-font-family: var(--de-font);
  --body-color: var(--de-ink);
  --body-color-rgb: 23, 33, 27;
  --link-color: var(--de-green-700);
  --link-color-rgb: 23, 97, 58;
  --link-hover-color: var(--de-green-900);
  --link-hover-color-rgb: 14, 59, 36;
  --border-color: var(--de-rule);
  --highlight-bg: #fbe7b8;
}

/* ---------- Base ---------- */
html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* Footer always sits at the bottom of the window: body is a full-height
   column and the footer is pushed down with margin-top: auto. */
body.site {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--de-font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--de-ink);
  background: var(--de-paper);
  font-optical-sizing: auto;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: var(--de-green-200);
  color: var(--de-green-950);
}
:focus-visible {
  outline: 3px solid var(--de-green-700);
  outline-offset: 2px;
  border-radius: 2px;
}
a {
  color: var(--de-green-700);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  transition: color .15s, text-decoration-color .15s;
}
a:hover {
  color: var(--de-green-900);
  text-decoration-thickness: 2px;
}
.site h1, .site h2, .site h3, .site h4 {
  font-family: var(--de-font-head);
  color: var(--de-green-950);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}
.site h2 { font-size: 1.5rem; letter-spacing: -.01em; margin: 2.75rem 0 .875rem; }
.site h3 { font-size: 1.1875rem; margin: 2rem 0 .625rem; }
hr {
  border: 0;
  border-top: 1px solid var(--de-rule);
  opacity: 1;
  margin: 2rem 0;
}
img { max-width: 100%; height: auto; }
.visually-hidden:not(:focus):not(:active) {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.de-wrap {
  width: 100%;
  max-width: var(--de-wrap);
  margin-inline: auto;
  padding-inline: var(--de-gutter);
}

.de-icon { flex: none; display: block; }

/* Skip link */
.de-skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -10rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--de-amber-400);
  color: var(--de-green-950);
  font-weight: 700;
  border-radius: 0 0 var(--de-radius) var(--de-radius);
  text-decoration: none;
}
.de-skip:focus { top: 0; outline-color: var(--de-green-950); }

/* ==========================================================================
   Header
   ========================================================================== */
.de-header {
  background: var(--de-green-900);
  color: #fff;
  position: relative;
  z-index: 20;
}
.de-header :focus-visible { outline-color: var(--de-amber-400); }
.de-header__topbar {
  background: var(--de-green-950);
  font-size: .875rem;
  padding-block: .375rem;
}
.de-header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand search"
    "nav nav";
  column-gap: 2rem;
  padding-top: clamp(1.25rem, 3vw, 2rem);
}
.de-brand { grid-area: brand; min-width: 0; padding-bottom: 1.25rem; }
.de-brand__link {
  display: inline-flex;
  flex-direction: column;
  gap: .25rem;
  color: #fff;
  text-decoration: none;
}
.de-brand__link:hover { color: #fff; }
.de-brand__link:hover .de-brand__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .15em; }
.site .de-brand__title {
  display: block;
  margin: 0;
  color: #fff;
  font-size: clamp(1.625rem, 1.1rem + 1.9vw, 2.375rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.de-brand__desc {
  display: block;
  max-width: 44ch;
  color: var(--de-green-100);
  font-size: clamp(.9375rem, .88rem + .25vw, 1.0625rem);
  line-height: 1.35;
}
.de-header__search { grid-area: search; align-self: center; }
.de-header__nav { grid-area: nav; }

/* ---------- Main nav (mod_menu layout "denri") ---------- */
.de-nav__toggle { display: none; }
.de-nav__list,
.de-nav__sub {
  list-style: none;
  margin: 0;
  padding: 0;
}
.de-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0 .25rem;
  margin-inline: -.875rem;
  border-top: 1px solid rgb(255 255 255 / .14);
}
.de-nav__item.level-1 {
  position: relative;
  display: flex;
  align-items: center;
}
.de-nav__item.level-1 > .de-nav__link {
  display: block;
  padding: .9375rem .875rem 1rem;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  text-decoration: none;
  position: relative;
}
.de-nav__item.level-1 > .de-nav__link:hover { color: #fff; text-decoration: underline; text-underline-offset: .25em; }
.de-nav__item.level-1.is-active > .de-nav__link { box-shadow: inset 0 -3px 0 var(--de-amber-400); }
.de-nav__item.level-1.has-children > .de-nav__link { padding-inline-end: .25rem; }

.de-nav__subtoggle {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-inline-end: .375rem;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--de-green-100);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.de-nav__subtoggle:hover { background: rgb(255 255 255 / .1); color: #fff; }
.de-nav__subtoggle .de-icon { transition: transform .25s var(--de-ease); }
.de-nav__subtoggle[aria-expanded="true"] .de-icon { transform: rotate(180deg); }

.de-nav__sub {
  position: absolute;
  top: calc(100% - .25rem);
  inset-inline-start: .25rem;
  min-width: 15rem;
  max-width: 24rem;
  padding: .5rem;
  background: var(--de-paper);
  border-radius: var(--de-radius);
  box-shadow: var(--de-shadow);
  z-index: 30;
  visibility: hidden;
}
.de-nav__subtoggle[aria-expanded="true"] + .de-nav__sub,
html:not(.de-js) .de-nav__item:focus-within > .de-nav__sub,
html:not(.de-js) .de-nav__item:hover > .de-nav__sub {
  visibility: visible;
}
.de-nav__sub .de-nav__link {
  display: block;
  padding: .5rem .75rem;
  border-radius: 4px;
  color: var(--de-ink);
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}
.de-nav__sub .de-nav__link:hover { background: var(--de-green-50); color: var(--de-green-900); }
.de-nav__sub .de-nav__link:focus-visible { outline-color: var(--de-green-700); }
.de-nav__sub .is-current > .de-nav__link {
  background: var(--de-green-100);
  color: var(--de-green-950);
  font-weight: 700;
}

/* ---------- Header / nav, narrow screens ----------
   Works whatever wraps the menu module (e.g. a "moduletable" div from the
   module's own Module Style): the button is pinned top right, the menu
   opens as a panel under the title. */
@media (max-width: 61.999em) {
  .de-header__inner {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "brand" "nav" "search";
    padding-top: 1rem;
  }
  .de-brand { padding: 0 6.75rem 1rem 0; }
  .site .de-brand__title { font-size: clamp(1.375rem, 1rem + 2vw, 1.75rem); }
  .de-brand__desc { font-size: .9375rem; }
  .de-header__nav .moduletable { margin: 0; }
  .de-header__nav .moduletable > :is(h2, h3) { display: none; }

  .de-nav__toggle {
    position: absolute;
    top: 1rem;
    inset-inline-end: var(--de-gutter);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.75rem;
    padding: .5rem .875rem;
    border: 1px solid rgb(255 255 255 / .4);
    border-radius: var(--de-radius);
    background: transparent;
    color: #fff;
    font: 600 1rem/1 var(--de-font);
    cursor: pointer;
  }
  .de-nav__toggle:hover { background: rgb(255 255 255 / .08); }
  .de-nav__toggle[aria-expanded="true"] { background: #fff; color: var(--de-green-900); border-color: #fff; }
  .de-nav__toggle .de-nav__close,
  .de-nav__toggle[aria-expanded="true"] .de-nav__open { display: none; }
  .de-nav__toggle[aria-expanded="true"] .de-nav__close { display: inline-flex; }
  .de-nav__toggle > span { display: inline-flex; align-items: center; gap: .5rem; }

  /* Open menu: a darker panel under the header text */
  .de-nav__list {
    flex-direction: column;
    gap: 0;
    margin: 0 calc(var(--de-gutter) * -1);
    padding: .5rem 0 1rem;
    background: var(--de-green-950);
    border-top: 0;
  }
  .de-js .de-nav__toggle[aria-expanded="false"] + .de-nav__list { display: none; }
  .de-nav__item.level-1 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .de-nav__item.level-1 + .de-nav__item.level-1 { border-top: 1px solid rgb(255 255 255 / .08); }
  .de-nav__item.level-1 > .de-nav__link,
  .de-nav__item.level-1.has-children > .de-nav__link {
    padding: .875rem var(--de-gutter);
    font-size: 1.0625rem;
  }
  .de-nav__item.level-1 > .de-nav__link:hover { text-decoration: underline; }
  .de-nav__item.level-1.is-active > .de-nav__link { box-shadow: inset 4px 0 0 var(--de-amber-400); }
  .de-nav__subtoggle {
    width: 3rem;
    height: 2.75rem;
    margin: 0 calc(var(--de-gutter) - .75rem) 0 0;
    border-inline-start: 1px solid rgb(255 255 255 / .12);
    border-radius: 0;
  }
  .de-nav__sub {
    grid-column: 1 / -1;
    position: static;
    min-width: 0;
    max-width: none;
    margin: 0 var(--de-gutter) .75rem calc(var(--de-gutter) + .25rem);
    padding: 0;
    border-inline-start: 2px solid rgb(255 255 255 / .16);
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    visibility: visible;
  }
  .de-js .de-nav__subtoggle[aria-expanded="false"] + .de-nav__sub { display: none; }
  .de-nav__sub .de-nav__link {
    margin-inline-start: -2px;
    padding: .5rem 0 .5rem 1rem;
    border-inline-start: 2px solid transparent;
    border-radius: 0;
    color: var(--de-green-100);
    font-weight: 500;
  }
  .de-nav__sub .de-nav__link:hover { background: none; color: #fff; text-decoration: underline; }
  .de-nav__sub .de-nav__link:focus-visible { outline-color: var(--de-amber-400); outline-offset: -2px; }
  .de-nav__sub .is-current > .de-nav__link {
    background: none;
    color: #fff;
    font-weight: 700;
    border-inline-start-color: var(--de-amber-400);
  }
}
@media (max-width: 23.999em) {
  .de-brand { padding-inline-end: 6rem; }
  .de-nav__toggle { padding-inline: .625rem; }
}

/* ==========================================================================
   Body layout
   ========================================================================== */
.de-body {
  flex: none;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.de-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem 4rem;
}
@media (min-width: 62em) {
  .has-sidebar .de-layout { grid-template-columns: minmax(0, 1fr) 16rem; }
}
.de-main:focus { outline: none; }
.de-main > :first-child { margin-top: 0; }

/* Breadcrumbs and page title on a full-width tinted band.
   The title is whatever the component outputs first: a .page-header
   (articles, single contacts) or a bare h1 (e.g. the contact category list).
   Headings inside article text and modules are excluded. */
.de-crumbs {
  position: relative;
  z-index: 1; /* above the title band so focus outlines aren't covered */
  padding-top: 1.125rem;
  padding-bottom: .25rem;
  border-image: conic-gradient(var(--de-green-50) 0 0) fill 0 / 0 / 0 100vmax;
}
.de-crumbs a:focus-visible { outline-offset: 3px; }

.is-inner .de-main :is(.page-header, h1):not(.page-header *, [class*="__body"] *, .moduletable *, :is(.page-header, h1) ~ *) {
  position: relative;
  /* -1px avoids a hairline gap between the breadcrumb and title bands */
  margin: -1px 0 2.25rem;
  padding: calc(.75rem + 1px) 0 2.25rem;
  border: 0;
  /* tint plus a 1px line underneath, both full width */
  border-image: linear-gradient(to top, var(--de-rule) 1px, var(--de-green-50) 1px) fill 0 / 0 / 0 100vmax 1px;
}
.is-inner .de-layout { margin-top: 0; }
.is-inner .de-main { padding-top: 0; }
.is-inner .de-crumbs + .de-layout { row-gap: 0; }

/* Title text, whether it is the h1 itself or inside .page-header */
.is-inner .de-main :is(.page-header, h1):not(.page-header *, [class*="__body"] *, .moduletable *, :is(.page-header, h1) ~ *):is(h1),
.is-inner .page-header h1,
.is-inner .page-header h2 {
  max-width: 30ch;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  letter-spacing: -.02em;
  line-height: 1.12;
}
.is-inner .page-header h1,
.is-inner .page-header h2 { margin: 0; }

/* No double gap between the band and the first heading below it */
:is(.is-inner .de-main :is(.page-header, h1):not(.page-header *, [class*="__body"] *, .moduletable *, :is(.page-header, h1) ~ *)) + :is(h2, h3),
:is(.is-inner .de-main :is(.page-header, h1):not(.page-header *, [class*="__body"] *, .moduletable *, :is(.page-header, h1) ~ *)) + * > :is(h2, h3):first-child { margin-top: 0; }

/* Pages without a title: close the breadcrumb band with the same line */
.is-inner .de-crumbs:not(:has(+ .de-layout .de-main :is(.page-header, h1):not(.page-header *, [class*="__body"] *, .moduletable *, :is(.page-header, h1) ~ *))) {
  padding-bottom: 1.25rem;
  margin-bottom: 2.25rem;
  border-image: linear-gradient(to top, var(--de-rule) 1px, var(--de-green-50) 1px) fill 0 / 0 / 0 100vmax 1px;
}

/* Side column starts below the title band (height measured in denri.js). */
@media (min-width: 62em) {
  .is-inner.has-sidebar .de-aside { padding-top: var(--de-band-h, 0); }
}

/* ---------- Breadcrumbs (mod_breadcrumbs) ---------- */
.mod-breadcrumbs__wrapper { margin: 0; }
.de-crumbs .mod-breadcrumbs.breadcrumb {
  margin: 0;
  padding: 0 !important;
  background: none;
  font-size: .9375rem;
  line-height: 1.4;
  color: var(--de-ink-2);
  gap: .125rem 0;
}
.de-crumbs .mod-breadcrumbs__divider { display: none; }
.de-crumbs .breadcrumb-item + .breadcrumb-item { padding-inline-start: .5rem; }
.de-crumbs .breadcrumb-item + .breadcrumb-item::before {
  content: "";
  float: none;
  display: inline-block;
  width: .4em; height: .4em;
  margin-inline-end: .625rem;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(-.12em) rotate(45deg);
  padding: 0;
  opacity: .6;
}
.de-crumbs .breadcrumb-item a { color: var(--de-green-700); }
.de-crumbs .breadcrumb-item.active { color: var(--de-ink-2); }

/* ==========================================================================
   Article reading column (com_content)
   ========================================================================== */
.com-content-article__body {
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}
/* Long URLs used as link text need to wrap on phones */
.com-content-article__body a,
.de-main td,
.de-outputs a { overflow-wrap: anywhere; }
.com-content-article__body::after { content: ""; display: table; clear: both; }
.com-content-article__body > :is(p, ul, ol, h1, h2, h3, h4, blockquote, dl) {
  max-width: var(--de-measure);
}
.com-content-article__body p { margin: 0 0 1.125rem; }
.com-content-article__body ul,
.com-content-article__body ol { padding-inline-start: 1.375rem; margin: 0 0 1.25rem; }
.com-content-article__body li { margin-bottom: .5rem; padding-inline-start: .25rem; }
.com-content-article__body li::marker { color: var(--de-green-600); }
.com-content-article__body em { font-style: italic; }
/* h1 used inside the Background article */
.com-content-article__body h1 {
  font-size: 1.75rem;
  margin: 3.25rem 0 1rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--de-rule);
  letter-spacing: -.015em;
}
.com-content-article__body h2:first-child,
.com-content-article__body h1:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* Floated photos without a caption get the same size as captioned ones
   (denri.js lowers it to the file's own width if smaller). */
.com-content-article__body img:is([style*="float: right"], [style*="float:right"], [style*="float: left"], [style*="float:left"]) {
  width: 17.5rem;
  max-width: 100%;
  height: auto;
}

/* Images inserted in the editor */
.com-content-article__body img {
  border-radius: 4px;
  background: var(--de-green-50);
}
.com-content-article__body img[style*="float: right"],
.com-content-article__body img[style*="float:right"] {
  margin: .375rem 0 1rem 1.75rem !important;
}
.com-content-article__body img[style*="float: left"],
.com-content-article__body img[style*="float:left"] {
  margin: .375rem 1.75rem 1rem 0 !important;
}
/* Captioned photos (built by denri.js from the image's alt text).
   The source photos are small, so they are shown at their own pixel size
   (never stretched) and the caption wraps to the photo's width. */
.com-content-article__body .de-figure {
  display: table; /* shrinks to the image; caption wraps to its width */
  margin: .375rem 0 1.25rem;
}
.com-content-article__body .de-figure--right { float: right; margin-inline-start: 1.75rem; }
.com-content-article__body .de-figure--left { float: left; margin-inline-end: 1.75rem; }
.com-content-article__body .de-figure img {
  display: block;
  width: 17.5rem; /* denri.js lowers this to the file's own width if smaller */
  max-width: calc(100vw - 2 * var(--de-gutter));
  height: auto;
  margin: 0 !important;
  border-radius: 0;
}
.com-content-article__body .de-figure__cap {
  display: table-caption;
  caption-side: bottom;
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid var(--de-rule);
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--de-ink-2);
}
@media (max-width: 39.999em) {
  .com-content-article__body .de-figure--right,
  .com-content-article__body .de-figure--left {
    float: none;
    margin: 0 0 1.5rem;
  }
}

/* Paragraphs holding only a chart image (Output 1) */
.com-content-article__body p:has(> img:only-child):not(:has(img[style*="float"])) {
  max-width: none;
  margin: 0 0 1.5rem;
}
.com-content-article__body p:has(> img:only-child):not(:has(img[style*="float"])) > img {
  display: block;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--de-rule);
  border-radius: var(--de-radius);
}
@media (max-width: 39.999em) {
  .com-content-article__body img[style*="float"] {
    float: none !important;
    display: block;
    margin: 0 0 1.25rem !important;
  }
}
/* Empty <div align> spacers from the old editor */
.com-content-article__body div[align]:not(:has(*)) { display: none; }

/* PDF links get a file icon */
.com-content-article__body a[href$=".pdf" i] {
  padding-inline-start: 1.125em;
  background: no-repeat left .2em / .875em 1.05em
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 17'%3E%3Cpath d='M1.5 1.5h7l4 4v10h-11z' fill='none' stroke='%2317613a' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M8.5 1.5v4h4' fill='none' stroke='%2317613a' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- Tables (legacy editor tables + core tables) ---------- */
.com-content-article__body table {
  width: 100%;
  border-collapse: collapse;
  font-size: .96875rem;
  line-height: 1.5;
  margin: 0 0 1.5rem;
  font-variant-numeric: tabular-nums;
}
/* Stakeholders: outer layout table */
.com-content-article__body table[border="0"],
.com-content-article__body table[border="0"] > tbody,
.com-content-article__body table[border="0"] > tbody > tr,
.com-content-article__body table[border="0"] > tbody > tr > td {
  display: block;
  padding: 0;
  border: 0;
}
.com-content-article__body table[border="0"] > tbody > tr:first-child > td {
  font-size: 1.1875rem;
  margin-bottom: .75rem;
}
.com-content-article__body table[border="0"] > tbody > tr:first-child div[align] { text-align: start; }
.com-content-article__body table[border="0"] > tbody > tr:first-child strong { color: var(--de-green-950); }
.com-content-article__body table[border="1"] {
  border: 1px solid var(--de-rule);
  border-radius: var(--de-radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}
.com-content-article__body table[border="1"] td,
.com-content-article__body table[border="1"] th {
  padding: .625rem .875rem;
  vertical-align: top;
  border: 0;
  border-top: 1px solid var(--de-rule-2);
}
.com-content-article__body table[border="1"] td p { margin: 0; }
.com-content-article__body table td > br:first-child { display: none; }
.com-content-article__body table[border="1"] tr.de-labels td,
.com-content-article__body table[border="1"]:not(.de-table) tr:first-child td {
  border-top: 0;
  background: var(--de-green-900);
  color: #fff;
  font-size: .875rem;
  letter-spacing: .01em;
}
.com-content-article__body table[border="1"] tr:first-child td :is(em, strong) { font-style: normal; color: #fff; }
.com-content-article__body table[border="1"] td:first-child {
  font-weight: 700;
  color: var(--de-green-900);
  width: 22%;
}
/* Empty spacer rows (marked .de-spacer by denri.js) */
.com-content-article__body table tr.de-spacer td {
  padding: 0;
  height: .375rem;
  background: var(--de-green-50);
  font-size: 0;
}
.com-content-article__body table[border="1"] tr:last-child td { border-bottom: 0; }
@media (max-width: 47.999em) {
  /* No JS: horizontal scroll */
  .com-content-article__body table[border="1"]:not(.de-table) {
    display: block;
    overflow-x: auto;
  }
  .com-content-article__body table[border="1"]:not(.de-table) > tbody { display: table; min-width: 38rem; width: 100%; }

  /* With JS: stack each row, using the first row as labels */
  .com-content-article__body table.de-table,
  .com-content-article__body table.de-table > tbody,
  .com-content-article__body table.de-table tr,
  .com-content-article__body table.de-table td { display: block; width: auto !important; }
  .com-content-article__body table.de-table { border-radius: var(--de-radius); }
  .com-content-article__body table.de-table tr.de-labels { display: none; }
  .com-content-article__body table.de-table tr { padding: .75rem 1rem; border-top: 1px solid var(--de-rule-2); }
  .com-content-article__body table.de-table tr:nth-child(2) { border-top: 0; }
  .com-content-article__body table.de-table td { padding: 0; border: 0; }
  .com-content-article__body table.de-table td.de-empty { display: none; }
  .com-content-article__body table.de-table td + td { margin-top: .375rem; }
  .com-content-article__body table.de-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: .8125rem;
    font-weight: 700;
    font-style: normal;
    color: var(--de-ink-2);
  }
  .com-content-article__body table.de-table td:first-child:not(.de-empty) {
    margin: -.75rem -1rem .75rem;
    padding: .625rem 1rem;
    background: var(--de-green-900);
    color: #fff;
  }
  .com-content-article__body table.de-table td:first-child:not(.de-empty)::before { color: var(--de-green-100); }
  .com-content-article__body table.de-table tr.de-spacer { display: none; }
  .com-content-article__body table.de-table tr.de-group-only { padding: 0; }
  .com-content-article__body table.de-table tr.de-group-only td:first-child:not(.de-empty) { margin: 0; }
}

/* ==========================================================================
   Page-specific content patterns (driven by menu alias body classes)
   ========================================================================== */

/* Definitions */
.alias-definitions .com-content-article__body > p {
  padding: 1.125rem 0 0;
  margin: 0 0 1.125rem;
  border-top: 1px solid var(--de-rule-2);
}
.alias-definitions .com-content-article__body > p:first-child { border-top: 0; padding-top: 0; }
.alias-definitions .com-content-article__body > p > strong:first-child {
  color: var(--de-green-900);
  font-size: 1.125rem;
}

/* Q&A */
.alias-q-a .com-content-article__body > p:has(> strong:only-child):not(:has(> a)) {
  margin: 1.5rem 0 .25rem;
  font-size: .9375rem;
  line-height: 1.3;
  color: var(--de-green-800);
}
.alias-q-a .com-content-article__body > p:has(> strong:only-child) + p { margin-top: 0; }
.alias-q-a .com-content-article__body > hr {
  margin: 2.25rem 0 0;
  max-width: var(--de-measure);
}
.alias-q-a .com-content-article__body > p:first-child {
  font-size: 1.1875rem;
  color: var(--de-ink-2);
}

/* Publications */
.alias-publications .com-content-article__body > p {
  padding-bottom: 1.125rem;
  border-bottom: 1px solid var(--de-rule-2);
}
.alias-publications .com-content-article__body > p:first-child {
  padding: 1rem 1.125rem;
  background: var(--de-green-50);
  border: 0;
  border-radius: var(--de-radius);
  font-size: .96875rem;
  color: var(--de-ink-2);
}
.alias-publications .com-content-article__body > h2 { margin-top: 3rem; }

/* Project Funding: contact addresses in two columns */
@media (min-width: 48em) {
  .alias-project-funding .com-content-article__body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 2.5rem;
    max-width: 52rem;
  }
  .alias-project-funding .com-content-article__body > p:nth-child(-n+2) { grid-column: 1 / -1; }
}
.alias-project-funding .com-content-article__body > p:nth-child(n+3) {
  padding: 1.25rem 1.375rem;
  border: 1px solid var(--de-rule);
  border-radius: var(--de-radius);
  line-height: 1.55;
  font-size: 1rem;
}
.alias-project-funding .com-content-article__body > p:nth-child(n+3) strong { color: var(--de-green-900); }

/* ==========================================================================
   Home page
   ========================================================================== */
.is-home .de-body { padding-top: 3rem; padding-bottom: 3rem; }
.is-home .item-page > .page-header { display: none; }

/* Intro paragraph on the left, the two photos side by side on the right. */
.is-home .com-content-article__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 1rem;
}
.is-home .com-content-article__body > p:first-child {
  max-width: 40ch;
  margin: 0 2rem 0 0;
  font-size: 1.5rem;
  line-height: 1.45;
  color: var(--de-green-950);
}
.is-home .com-content-article__body > p:has(img) { margin: 0; max-width: none; }
.is-home .com-content-article__body > p:has(img) .de-figure { margin: 0; float: none; }
.is-home .com-content-article__body > p:has(img) img {
  float: none !important;
  margin: 0 !important;
  display: block;
  width: 15rem; /* denri.js lowers this to the file's own width if smaller */
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0;
}
@media (max-width: 61.999em) {
  .is-home .com-content-article__body { grid-template-columns: 1fr 1fr; }
  .is-home .com-content-article__body > p:first-child { grid-column: 1 / -1; margin: 0 0 .5rem; font-size: 1.3125rem; }
}

/* Home modules. */
.de-band { padding-block: 2.5rem 3rem; }
.de-band--tint { background: var(--de-green-50); border-top: 1px solid var(--de-rule-2); }
.de-band .moduletable > :is(h2, h3):first-child {
  margin: 0 0 1rem;
  font-size: 1.375rem;
}
.de-band .moduletable + .moduletable { margin-top: 2.5rem; }

/* Outputs list (mod_custom, class "de-outputs"): two plain columns of links. */
.de-outputs {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2 22rem;
  column-gap: 3rem;
}
.de-outputs li {
  break-inside: avoid;
  margin: 0;
  padding: .625rem 0;
  border-bottom: 1px solid var(--de-green-200);
  line-height: 1.45;
}
.de-outputs a { color: var(--de-green-800); }
.de-outputs a:hover { color: var(--de-green-950); }

/* ==========================================================================
   Sidebar ("In this section" menus etc.)
   ========================================================================== */
.de-aside .moduletable > :is(h2, h3):first-child {
  margin: 0 0 .75rem;
  font-size: .875rem;
  font-weight: 700;
  color: var(--de-ink-2);
}
.de-subnav__list, .de-subnav__sub { list-style: none; margin: 0; padding: 0; }
.de-subnav__list { border-inline-start: 2px solid var(--de-rule); }
.de-subnav__link {
  display: block;
  margin-inline-start: -2px;
  padding: .4375rem 0 .4375rem 1rem;
  border-inline-start: 2px solid transparent;
  color: var(--de-ink);
  font-size: .96875rem;
  line-height: 1.35;
  text-decoration: none;
}
.de-subnav__link:hover { color: var(--de-green-700); border-inline-start-color: var(--de-green-200); }
.de-subnav__item.is-current > .de-subnav__link {
  border-inline-start-color: var(--de-green-700);
  color: var(--de-green-900);
  font-weight: 700;
}
.de-subnav__sub .de-subnav__link { padding-inline-start: 1.75rem; }
@media (min-width: 62em) {
  .de-aside { align-self: start; }
}
@media (max-width: 61.999em) {
  .de-aside {
    padding-top: 2rem;
    border-top: 1px solid var(--de-rule);
  }
}

/* ==========================================================================
   Core component output (contacts, forms, messages, pagination)
   ========================================================================== */
.com-contact-featured__table,
.com-contact-category__table,
.de-main .table {
  --table-bg: transparent;
  --table-striped-bg: transparent;
  --table-hover-bg: var(--de-green-50);
  width: 100%;
  border: 0;
  font-size: 1rem;
}
.de-main .table > :not(caption) > * > * {
  padding: .875rem .75rem;
  border-width: 0 0 1px;
  border-color: var(--de-rule-2);
  box-shadow: none;
}
.de-main .table thead th {
  border-bottom: 2px solid var(--de-green-900);
  font-size: .875rem;
  color: var(--de-ink-2);
  white-space: nowrap;
}
.de-main .table thead th a { color: inherit; text-decoration: none; }
.de-main .table thead th a:hover { color: var(--de-green-700); text-decoration: underline; }
.de-main .table tbody th { font-weight: 600; }
.de-main .table .item-phone { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--de-ink-2); }
.de-main .table-bordered > :not(caption) > * > * { border-inline-width: 0; }
.de-main .table-bordered > :not(caption) > * { border-width: 0; }

/* Single contact page: icon and text side by side at every width */
.com-contact__info dl.dl-horizontal {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .375rem .75rem;
  align-items: baseline;
  margin: 1.25rem 0 0;
}
.com-contact__info dl.dl-horizontal > dt,
.com-contact__info dl.dl-horizontal > dd { margin: 0; width: auto; float: none; }
.com-contact__info .icon-address,
.com-contact__info .icon-phone,
.com-contact__info .icon-fax,
.com-contact__info .icon-envelope { color: var(--de-green-700); }
@media (max-width: 47.999em) {
  .com-contact-featured__table thead { display: none; }
  .com-contact-featured__table tr { display: block; padding: .875rem 0; border-bottom: 1px solid var(--de-rule-2); }
  .de-main .com-contact-featured__table > :not(caption) > * > * { display: block; padding: 0; border: 0; }
  .com-contact-featured__table .item-position { color: var(--de-ink); }
  .com-contact-featured__table td:empty { display: none; }
}

.de-main .btn-primary {
  --btn-bg: var(--de-green-800);
  --btn-border-color: var(--de-green-800);
  --btn-hover-bg: var(--de-green-950);
  --btn-hover-border-color: var(--de-green-950);
  font-weight: 600;
}
.de-main .form-control:focus,
.de-main .form-select:focus {
  border-color: var(--de-green-700);
  box-shadow: 0 0 0 .2rem rgb(23 97 58 / .25);
}
joomla-alert { border-radius: var(--de-radius); }

/* ==========================================================================
   Footer
   ========================================================================== */
.de-footer { margin-top: auto; }
.de-footer__partners {
  border-top: 1px solid var(--de-rule);
  padding-block: 1.75rem;
  background: var(--de-paper);
}
.de-footer__partners .moduletable > :is(h2, h3):first-child {
  margin: 0 0 1.25rem;
  font-size: .875rem;
  font-weight: 700;
  color: var(--de-ink-2);
  text-align: center;
}
.de-footer__partners p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem clamp(1.5rem, 4vw, 3rem);
  margin: 0;
  text-align: center !important;
}
.de-footer__partners a:empty { display: none; }
.de-footer__partners a { display: inline-flex; border-radius: 4px; }
.de-footer__partners img {
  width: auto !important;
  height: 4.75rem !important;
  max-width: 12rem;
  object-fit: contain;
}
.de-footer__partners img[src*="NRI-Logo"] { height: 4.25rem !important; max-width: 11rem; }
.de-footer__partners img[src*="CPHP"] { height: 4rem !important; }
@media (max-width: 39.999em) {
  .de-footer__partners { padding-block: 1.25rem; }
  .de-footer__partners p { flex-wrap: nowrap; gap: 1rem; }
  .de-footer__partners img,
  .de-footer__partners img[src*="NRI-Logo"],
  .de-footer__partners img[src*="CPHP"] { height: 2.75rem !important; max-width: 5.5rem; }
}

.de-footer__main {
  background: var(--de-green-950);
  color: var(--de-green-100);
  font-size: .9375rem;
  line-height: 1.5;
}
.de-footer__main :focus-visible { outline-color: var(--de-amber-400); }
.de-footer__main p { margin: 0; }
.de-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
  padding-block: 2rem 1.75rem;
}
/* Menu and funding columns are set off by a vertical rule */
.de-footer__col {
  margin-inline-start: 2rem;
  padding-inline-start: 2rem;
  border-inline-start: 1px solid rgb(255 255 255 / .14);
}
.de-footer__name {
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
}
.de-footer__desc {
  margin-top: .25rem !important;
  max-width: 34ch;
  color: var(--de-green-100);
}
.de-footer__note {
  display: inline-block;
  margin-top: .75rem !important;
  padding: .125rem .5rem;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: var(--de-radius);
  font-size: .8125rem;
  color: var(--de-green-100);
}
.de-footer__menu ul {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 1.5rem;
}
.de-footer__menu li { break-inside: avoid; padding: .125rem 0; }
.de-footer__menu a { color: #fff; text-decoration: none; }
.de-footer__menu a:hover,
.de-footer__menu a[aria-current] { text-decoration: underline; text-underline-offset: .2em; }
.de-footer__funding p { max-width: 32ch; color: var(--de-green-100); }
.de-footer__copy {
  padding: .875rem 0 1rem;
  border-top: 1px solid rgb(255 255 255 / .12);
  font-size: .8125rem;
  color: var(--de-green-200);
}
@media (max-width: 61.999em) {
  .de-footer__grid { grid-template-columns: 1fr 1fr; row-gap: 1.5rem; }
  .de-footer__about { grid-column: 1 / -1; }
  .de-footer__menu { margin: 0; padding: 0; border: 0; }
}
@media (max-width: 39.999em) {
  .de-footer__grid { grid-template-columns: 1fr; row-gap: 1.25rem; padding-block: 1.5rem; }
  .de-footer__col {
    margin: 0;
    padding: 1.25rem 0 0;
    border-inline-start: 0;
    border-top: 1px solid rgb(255 255 255 / .12);
  }
}

/* ==========================================================================
   Cassiopeia options: logo, fluid layout, sticky header, back to top
   ========================================================================== */
.de-brand__logo { display: block; max-height: 4.5rem; width: auto; }
.wrapper-fluid .de-wrap { max-width: none; }
.de-header.is-sticky { position: sticky; top: 0; }
/* An open phone menu can be taller than the screen: stop sticking while it's open. */
@media (max-width: 61.999em) {
  .de-header.is-sticky:has(.de-nav__toggle[aria-expanded="true"]) { position: relative; }
}
.back-to-top-link {
  background: var(--de-green-800);
  color: #fff;
  border-radius: var(--de-radius);
}
.back-to-top-link:hover { background: var(--de-green-950); color: #fff; }
.back-to-top-link:focus-visible { outline-color: var(--de-amber-400); }

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  .de-header { background: none; color: #000; }
  .de-brand__link, .site .de-brand__title, .de-brand__desc { color: #000; }
  .de-header__nav, .de-crumbs, .de-aside, .de-skip, .de-footer__partners { display: none; }
  .de-footer__main { background: none; color: #000; }
  .de-crumbs, .is-inner .page-header { border-image: none !important; background: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
}

/* Hide the "On this page" list on small screens */
@media (max-width: 61.999em) {
  .de-aside:has(> .de-toc:only-child) { display: none; }
}
