/*-- -------------------------- -->
<---      MacroData hero        -->
<--- -------------------------- -*/
@media only screen and (min-width: 0rem) {
  #md-hero {
    padding: var(--sectionPadding);
    padding-top: 6.25rem;
  }
  #md-hero .cs-container {
    width: 100%;
    max-width: 56.25rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sectionGap);
  }
  #md-hero .cs-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  #md-hero .cs-title,
  #md-hero .cs-text {
    max-width: fit-content;
  }
  #md-hero .md-crumbs {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
  }
  #md-hero .md-crumbs a {
    color: var(--bodyTextColor);
    opacity: 0.8;
    text-decoration: none;
  }
  #md-hero .md-crumbs a:hover {
    text-decoration: underline;
  }
  #md-hero .md-banner {
    width: 100%;
    max-height: 22rem;
    object-fit: cover;
    border-radius: 0.5rem;
  }
}

/*-- -------------------------- -->
<---     MacroData layout       -->
<--- -------------------------- -*/
@media only screen and (min-width: 0rem) {
  #md {
    padding: var(--sectionPadding);
  }
  #md .md-grid {
    width: 100%;
    max-width: 80rem;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  #md .md-side,
  #md .md-article {
    min-width: 0;
  }
  #md .md-article {
    max-width: 52rem;
  }

  /* Menu: a row of pills on phones, a card on desktop */
  .md-menu {
    background: #fff;
    border-radius: 6px;
    box-shadow: var(--boxCardShadow);
    padding: 0.75rem;
  }
  .md-menu-title {
    display: none;
  }
  .md-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .md-menu > ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
  }
  .md-menu .md-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }
  .md-menu .md-group > ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }
  .md-menu .md-group-title {
    display: none;
  }
  .md-menu li {
    flex-shrink: 0;
  }
  .md-menu a {
    display: block;
    white-space: nowrap;
    padding: 0.4375rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: var(--bodyTextColor);
    text-decoration: none;
    border-radius: 999px;
    transition: background-color 0.2s ease;
  }
  .md-menu a:hover {
    background: #f2f2f2;
  }
  .md-menu li.is-current > a {
    background: var(--headerColor);
    color: #fff;
    font-weight: 700;
  }
}

/* Desktop: the menu is a sticky card on the left */
@media only screen and (min-width: 64rem) {
  #md .md-grid {
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
  }
  #md .md-side {
    position: sticky;
    top: 7rem;
  }
  .md-menu {
    padding: 1.25rem;
  }
  .md-menu-title {
    display: block;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--headerColor);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--headerColor);
  }
  .md-menu > ul {
    display: block;
    overflow: visible;
    padding: 0;
  }
  .md-menu > ul > li + li {
    margin-top: 0.25rem;
  }
  .md-menu .md-group {
    display: block;
    margin-top: 1rem;
  }
  .md-menu .md-group > ul {
    display: block;
  }
  .md-menu .md-group-title {
    display: block;
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--headerColor);
  }
  .md-menu a {
    white-space: normal;
    border-radius: 4px;
    padding: 0.4375rem 0.625rem;
  }
  .md-menu li.is-current > a {
    font-weight: 600;
  }
}

/*-- -------------------------- -->
<---   Text of the pages        -->
<--- -------------------------- -*/
.md-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--bodyTextColor);
}
.md-body > *:first-child {
  margin-top: 0;
}
.md-body h1,
.md-body h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.25;
  color: var(--headerColor);
}
.md-body h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.25rem;
  color: var(--headerColor);
}
.md-body p {
  margin: 0 0 1rem;
}
.md-body ul,
.md-body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}
.md-body li {
  margin-bottom: 0.4rem;
}
.md-body a {
  color: var(--headerColor);
  font-weight: 600;
  text-decoration: underline;
}
.md-body strong {
  color: var(--headerColor);
}
.md-body code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  background: #eef3f0;
  border-radius: 3px;
}
.md-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border-radius: 0.5rem;
}
.md-body hr {
  margin: 2.5rem 0;
  border: none;
  border-top: 1px solid var(--lineColor, #ddd);
}
.md-body blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: #eef3f0;
  border-left: 4px solid var(--headerColor);
  border-radius: 0 0.5rem 0.5rem 0;
}
.md-body blockquote > *:last-child {
  margin-bottom: 0;
}

/* Numbered lists become numbered steps */
.md-body ol {
  list-style: none;
  padding-left: 0;
  counter-reset: md-step;
}
.md-body ol > li {
  position: relative;
  counter-increment: md-step;
  padding-left: 3rem;
  margin-bottom: 1.25rem;
  min-height: 2rem;
}
.md-body ol > li::before {
  content: counter(md-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--headerColor);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
}

.md-lead {
  margin: 0 0 1.5rem;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--bodyTextColor);
}
.md-intro + .md-body,
.md-intro + .md-table-wrap {
  margin-top: 0.5rem;
}

/*-- -------------------------- -->
<---      Home page blocks      -->
<--- -------------------------- -*/
.md-welcome {
  padding: 2rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: var(--boxCardShadow);
}
.md-welcome h2 {
  margin-top: 0;
}
.md-block {
  margin-top: 3rem;
}
.md-block-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  color: var(--headerColor);
}
.md-block-text {
  margin: 0 0 1.25rem;
  color: var(--bodyTextColor);
}

.md-stats {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.md-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 0.5rem;
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: var(--boxCardShadow);
}
.md-stat-number {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--headerColor);
}
.md-stat-label {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--bodyTextColor);
}
@media only screen and (min-width: 48rem) {
  .md-stats {
    grid-template-columns: repeat(5, 1fr);
  }
}

.md-map {
  height: 22rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #eef3f0;
  box-shadow: var(--boxCardShadow);
}

.md-spotlight {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: 0.75rem;
  background: var(--headerColor);
  color: #fff;
}
.md-spotlight-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.md-spotlight-title {
  margin: 0 0 1rem;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  color: #fff;
}
.md-spotlight-text {
  margin: 0 0 1rem;
  line-height: 1.7;
  color: #fff;
  opacity: 0.9;
}
.md-spotlight .md-pills li {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.md-spotlight .md-button {
  margin-top: 1.25rem;
  background: #fff;
  color: var(--headerColor);
}

.md-pills {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.md-pills li {
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--headerColor);
  background: #eef3f0;
  border-radius: 999px;
}
.md-pills-page {
  margin-top: 2.5rem;
}

.md-button {
  display: inline-block;
  margin: 0.25rem 0.5rem 0.25rem 0;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: var(--headerColor);
  border: 2px solid var(--headerColor);
  border-radius: 0.25rem;
  transition: opacity 0.2s ease;
}
.md-button:hover {
  opacity: 0.85;
}
.md-button.is-secondary {
  background: transparent;
  color: var(--headerColor);
}
.md-cta {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--lineColor, #ddd);
}

/*-- -------------------------- -->
<---    Dates, gallery, team    -->
<--- -------------------------- -*/
.md-table-wrap {
  margin: 1.5rem 0;
}
.md-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--boxCardShadow);
  font-size: 0.95rem;
}
.md-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--headerColor);
  background: #eef3f0;
}
.md-table td {
  padding: 0.85rem 1rem;
  color: var(--bodyTextColor);
  border-top: 1px solid #eef3f0;
}
@media only screen and (max-width: 47.99rem) {
  .md-table thead {
    display: none;
  }
  .md-table,
  .md-table tbody,
  .md-table tr,
  .md-table td {
    display: block;
    width: 100%;
  }
  .md-table tr {
    padding: 0.75rem 0;
    border-top: 1px solid #eef3f0;
  }
  .md-table tr:first-child {
    border-top: none;
  }
  .md-table td {
    border: none;
    padding: 0.25rem 1rem;
  }
  .md-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--headerColor);
    opacity: 0.7;
  }
  .md-table td:first-child {
    font-weight: 700;
    color: var(--headerColor);
  }
}

.md-event {
  margin-bottom: 3rem;
}
.md-event-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 1rem;
  font-size: 1.4rem;
  color: var(--headerColor);
}
.md-status {
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bodyTextColor);
  background: #eef3f0;
  border-radius: 999px;
}
.md-status.is-done {
  color: #fff;
  background: var(--headerColor);
}
.md-status.is-live {
  color: #fff;
  background: #2e8b57;
}
.md-group-photo {
  margin: 0 0 1rem;
}
.md-group-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}
.md-group-photo figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--bodyTextColor);
}
.md-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.md-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}
@media only screen and (min-width: 40rem) {
  .md-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
.md-placeholder {
  margin: 0;
  padding: 2rem;
  text-align: center;
  color: var(--bodyTextColor);
  opacity: 0.7;
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: var(--boxCardShadow);
}

.md-people {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media only screen and (min-width: 48rem) {
  .md-people {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media only screen and (min-width: 80rem) {
  .md-people {
    grid-template-columns: repeat(3, 1fr);
  }
}
.md-person {
  padding: 1.5rem;
  text-align: center;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: var(--boxCardShadow);
}
.md-person img {
  width: 7.5rem;
  height: 7.5rem;
  margin-bottom: 1rem;
  object-fit: cover;
  border-radius: 50%;
}
.md-person h3 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  color: var(--headerColor);
}
.md-person-role {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bodyTextColor);
}
.md-person-links {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}
.md-person-links a {
  margin: 0 0.4rem;
  color: var(--headerColor);
  font-weight: 600;
}
.md-person-bio {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--bodyTextColor);
  text-align: left;
}
.md-person-tags {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  font-size: 0.85rem;
  color: var(--bodyTextColor);
  opacity: 0.75;
}

/*-- -------------------------- -->
<---          News              -->
<--- -------------------------- -*/
.md-news {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.md-news-item {
  padding: 1.5rem;
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: var(--boxCardShadow);
}
.md-news-date {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bodyTextColor);
  opacity: 0.7;
}
.md-news-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--headerColor);
}
.md-news-body p:last-child {
  margin-bottom: 0;
}
.md-news-image {
  display: block;
  width: 100%;
  max-width: 24rem;
  height: auto;
  margin-top: 1rem;
  border-radius: 0.5rem;
}
.md-more {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  color: var(--headerColor);
}
.md-news-all + .md-body {
  margin-top: 2rem;
}

/* Funding note and the highlighted team member after a link from a profile */
.md-fund {
  margin: 2rem 0 0;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  text-align: center;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: var(--boxCardShadow);
}
.md-fund a {
  font-weight: 700;
  color: var(--headerColor);
}
.md-person:target {
  outline: 2px solid var(--headerColor);
  outline-offset: 2px;
}
