@font-face {
  font-family: Merriweather;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/merriweather-700.woff2") format("woff2");
}

@font-face {
  font-family: Roboto;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/roboto.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto Mono";
  font-weight: 100 700;
  font-display: swap;
  src: url("../assets/fonts/roboto-mono.woff2") format("woff2");
}

:root {
  --md-text-font: "Roboto";
  --md-code-font: "Roboto Mono";
  --md-status--draft: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497zM15 5l4 4"/></svg>');
}

[data-md-color-scheme="default"] {
  --md-default-bg-color: var(--hdx-neutral-01);
  --md-default-fg-color: var(--hdx-neutral-9);
  --md-default-fg-color--light: var(--hdx-neutral-7);
  --md-default-fg-color--lighter: var(--hdx-neutral-5);
  --md-default-fg-color--lightest: var(--hdx-neutral-2);
  --md-typeset-a-color: var(--hdx-primary-5);
  --md-accent-fg-color: var(--hdx-primary-9);
  --md-accent-fg-color--transparent: var(--hdx-primary-05);
}

.md-header {
  color: var(--hdx-neutral-0);
  background-color: var(--hdx-brand-7);
  backdrop-filter: none;
}

.md-header .md-logo img {
  height: 1.8rem;
}

/* The OCHA logo is white, so it goes dark on the drawer's white background. */
.md-nav__title .md-logo img {
  filter: brightness(0);
}

.md-tabs {
  color: var(--hdx-brand-05);
  background-color: var(--hdx-brand-7);
  box-shadow: none;
}

.md-tabs__item--active .md-tabs__link,
.md-tabs__link:hover {
  color: var(--hdx-neutral-0);
}

.md-tabs__item--active {
  border-bottom-color: var(--hdx-neutral-0);
}

.md-header .md-search__button {
  color: var(--hdx-neutral-0);
  background-color: var(--hdx-overlay-white-15);
}

.md-header .md-search__button::before {
  background-color: var(--hdx-neutral-0);
}

.md-header .md-search__button::after {
  color: var(--hdx-neutral-0);
  background-color: var(--hdx-overlay-white-20);
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-family: var(--hdx-font-display);
  font-weight: 700;
}

.md-status--draft::after {
  mask-image: var(--md-status--draft);
  -webkit-mask-image: var(--md-status--draft);
}

.grid.cards.draft > ul > li {
  opacity: 0.7;
}

.grid.cards.draft > ul > li:hover {
  opacity: 1;
}

.grid.cards.draft > ul > li::before {
  content: "Draft";
  float: right;
  padding-left: 1.3em;
  font-size: 0.7rem;
  color: var(--md-default-fg-color--light);
  background: no-repeat left center / 1em url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23888" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497zM15 5l4 4"/></svg>');
}

[dir] .md-typeset h2.section-label {
  margin-bottom: 0.8rem;
  color: var(--md-default-fg-color--light);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

[dir] .md-typeset .phase-steps ol {
  counter-reset: step;
  margin: 1em 0;
  padding: 0;
  list-style: none;
}

[dir] .md-typeset .phase-steps ol li {
  position: relative;
  z-index: 0;
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 0.9rem;
  margin: 0 0 0.6rem;
  padding: 0.7rem 0.9rem 0.7rem 3.4rem;
}

[dir] .md-typeset .phase-steps ol li::before {
  content: counter(step);
  position: absolute;
  top: 0.65rem;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--hdx-brand-7);
  color: var(--hdx-neutral-0);
  font-size: 0.7rem;
  font-weight: 600;
}

[dir] .md-typeset .phase-steps ol li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 2.25rem;
  bottom: -0.6rem;
  left: calc(0.8rem - 1px);
  width: 2px;
  background: var(--md-default-fg-color--lightest);
}

[dir] .md-typeset .phase-steps ol li p:first-child::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 2.6rem;
  border: 1px solid var(--hdx-neutral-1);
  border-radius: var(--hdx-radius-md);
  background: var(--hdx-neutral-0);
  box-shadow: var(--hdx-shadow-sm);
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
}

[dir] .md-typeset .phase-steps ol li:hover p:first-child::before {
  border-color: var(--hdx-neutral-2);
  box-shadow: var(--hdx-shadow-md);
  transform: translateY(-1px);
}

[dir] .md-typeset .phase-steps ol li p {
  grid-column: 2;
  margin: 0;
}

[dir] .md-typeset .phase-steps ol li p:first-child {
  font-size: 0.88rem;
  line-height: 1.6rem;
}

[dir] .md-typeset .phase-steps ol li p:first-child strong {
  font-weight: 600;
}

[dir] .md-typeset .phase-steps ol li p + p {
  color: var(--md-default-fg-color--light);
  font-size: 0.7rem;
  line-height: 1.45;
}

[dir] .md-typeset .phase-steps ol li p:first-child a {
  color: var(--md-default-fg-color);
  text-decoration: none;
}

[dir] .md-typeset .phase-steps ol li p:first-child a::after {
  content: "";
  position: absolute;
  inset: 0 0 0 2.6rem;
}

[dir] .md-typeset .phase-steps ol li p + p + p {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--md-default-fg-color);
}

[dir] .md-typeset .phase-steps ol li p + p + p .twemoji {
  height: 2.4rem;
}

[dir] .md-typeset .phase-steps ol li p + p + p .twemoji svg {
  width: 2.4rem;
  max-height: none;
  fill: none;
}
