/* The template class keeps these adjustments local to funding project pages. */
.funding-project-page > h1 {
  margin-bottom: 0.6rem;
}

.funding-project-summary {
  color: var(--md-default-fg-color--light);
  margin: 0 0 1.5rem;
  max-width: 42rem;
}

.md-typeset .funding-project-page > .funding-project-summary + h2 {
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  font-size: 1rem;
  margin: 0 0 0.8rem;
  padding-bottom: 0.6rem;
}

.funding-project-body {
  margin-top: 1.5rem;
}

.funding-project-body > :first-child {
  margin-top: 0;
}

.funding-overview {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  margin: 0;
  padding: 0.8rem;
}

.funding-overview + .funding-overview {
  margin-top: 0.6rem;
}

.funding-overview__header,
.funding-part__header {
  align-items: flex-start;
  display: flex;
  gap: 0.6rem;
  justify-content: space-between;
}

.funding-overview__header h3,
.funding-part__header h3 {
  line-height: 1.35;
  margin: 0;
}

.funding-overview__header h3 {
  font-size: 0.85rem;
}

.funding-overview__method,
.funding-part__method {
  color: var(--md-default-fg-color--light);
  margin: 0.2rem 0 0;
}

.funding-overview__method {
  font-size: 0.72rem;
}

.funding-status {
  background: var(--md-code-bg-color);
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 4px;
  color: var(--md-default-fg-color--light);
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.5;
  padding: 0.08rem 0.32rem;
}

.funding-status--complete {
  border-color: var(--md-accent-fg-color);
  color: var(--md-accent-fg-color);
}

.funding-overview__amount {
  font-size: 0.95rem;
  margin: 1rem 0 0.2rem;
}

.funding-overview__progress-copy {
  color: var(--md-default-fg-color--light);
  display: flex;
  font-size: 0.7rem;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.funding-progress {
  background: var(--md-default-fg-color--lightest);
  border-radius: 3px;
  height: 0.45rem;
  overflow: hidden;
  width: 100%;
}

.funding-progress__value {
  background: var(--md-accent-fg-color);
  display: block;
  height: 100%;
}

.funding-note {
  align-items: baseline;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
}

.funding-note__label {
  font-size: 0.68rem;
  font-weight: 600;
}

.funding-note__key {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  padding: 0.2rem 0.4rem;
  user-select: all;
  white-space: nowrap;
}

.funding-note__help {
  color: var(--md-default-fg-color--light);
  font-size: 0.66rem;
}

.funding-parts {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0.6rem 0 1.2rem;
}

.funding-part {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  min-width: 0;
  padding: 0.8rem;
}

.funding-part__header h3 {
  font-size: 0.75rem;
}

.funding-part__method,
.funding-part__value,
.funding-part__detail {
  color: var(--md-default-fg-color--light);
  font-size: 0.64rem;
}

.funding-part__value {
  margin: 0.6rem 0 0;
}

.funding-part__result {
  align-items: flex-start;
  background: var(--md-code-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 4px;
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
  padding: 0.6rem;
}

.funding-part__check {
  align-items: center;
  background: var(--md-accent-fg-color--transparent);
  border-radius: 50%;
  color: var(--md-accent-fg-color);
  display: inline-flex;
  flex: 0 0 1rem;
  font-size: 0.6rem;
  height: 1rem;
  justify-content: center;
}

.funding-part__completion {
  font-size: 0.66rem;
  font-weight: 600;
  margin: 0;
}

.funding-part__detail {
  line-height: 1.45;
  margin: 0.2rem 0 0;
}

@media screen and (max-width: 44rem) {
  .funding-note__help {
    flex-basis: 100%;
  }

  .funding-parts {
    grid-template-columns: 1fr;
  }
}
