/* User Provided Stylesheet */

@import url('https://cdn.jsdelivr.net/npm/@fontsource/montserrat@5.3.0/500.css');

.myst-home-link span {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
}

.myst-made-with-myst {
  display: none;
}

/* sapling green (#339966). link colors keep 4.5:1 contrast. */
:root {
  --myst-color-primary: #339966;
  --myst-color-primary-hover: #267a52;
  --myst-color-link: #267a52;
  --myst-color-link-hover: #339966;
  --myst-color-link-underline: #5cc28f;
  --myst-color-active: #267a52;
  --myst-color-active-bg: rgba(51, 153, 102, 0.15);
  --myst-color-active-surface: #edf7f1;
  --myst-color-surface: #edf7f1;
  --myst-color-surface-hover: #dcefe4;
  --myst-color-focus-ring: #339966;
  --myst-color-focus-outline: #b7e0c9;
  --myst-color-accent-text: #1a4d35;
  --myst-color-accent-surface: #edf7f1;
  --myst-color-accent-surface-border: #b7e0c9;
  --myst-color-accent-surface-text: #1a4d35;
  --myst-color-inverse-bg: #1a4d35;
}
.dark {
  --myst-color-link: #5cc28f;
  --myst-color-link-hover: #8fd6b0;
  --myst-color-link-underline: #339966;
  --myst-color-active: #5cc28f;
  --myst-color-active-bg: rgba(51, 153, 102, 0.2);
  --myst-color-active-surface: #233a2e;
  --myst-color-surface: #233a2e;
  --myst-color-surface-hover: #2c4a3a;
  --myst-color-focus-ring: #5cc28f;
  --myst-color-focus-outline: #5cc28f;
  --myst-color-accent-text: #d3f0e0;
  --myst-color-accent-surface: #1a4d354d;
  --myst-color-accent-surface-border: #267a52;
  --myst-color-accent-surface-text: #edf7f1;
  --myst-color-info-bg: #292524;
  --myst-color-success-bg: #292524;
  --myst-color-warning-bg: #292524;
  --myst-color-danger-bg: #292524;
  --myst-color-error-bg: #292524;
  --myst-color-theorem-bg: #292524;
  --myst-color-example-bg: #292524;
  --myst-color-proof-bg: #292524;
}

/* {scroll-code}: plugins/scroll-code.mjs explains how this works. The reading line is 40% down the screen. */
.scroll-code {
  .scroll-code-src > * + * {
    display: none;
  }
  @supports (animation-timeline: view()) {
    @media (min-width: 1024px) {
      display: flex;
      gap: 1.5rem;
      align-items: flex-start;
      /* The sticky code paints over the text after it, so its shadow needs room. */
      margin-bottom: 2.5rem;
      .scroll-code-src {
        position: sticky;
        top: 5rem;
        flex: 3;
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
      }
      /* Opaque and isolated, so a copy covers the theme's highlighted lines of the copies under it. */
      .scroll-code-src > * {
        grid-area: 1 / 1;
        background: var(--myst-color-bg);
        isolation: isolate;
      }
      .scroll-code-src > * + * {
        display: block;
        visibility: hidden;
        animation: scroll-code-show linear forwards;
      }
      /* Only keep a single shadow of the stack. */
      .scroll-code-src > * + * .myst-code {
        box-shadow: none;
      }
      .scroll-code-src .myst-code {
        margin: 0;
      }
      /* The first step reaches the reading line as the code sticks, the last while code as tall as the screen still sticks. */
      .scroll-code-steps {
        flex: 2;
        padding: calc(40vh - 5rem) 0 calc(60vh - 9rem);
      }
      /* More than one mouse-wheel notch of scrolling per step. */
      .scroll-code-step {
        min-height: 9rem;
        padding: 1.5rem 0;
        opacity: 0.45;
        animation: scroll-code-on-step linear;
        animation-timeline: view(40% 60%);
        view-timeline-inset: 40% 60%;
      }
      .scroll-code-step > * {
        margin-block: 0;
      }
    }
  }
}
@keyframes scroll-code-show {
  from,
  to {
    visibility: visible;
  }
}
@keyframes scroll-code-on-step {
  from,
  to {
    opacity: 1;
  }
}

/* Landing page (index.md). The hero logo is contained, so it keeps its shape beside the text. */
.landing-hero .myst-landing-split-img-image img {
  object-fit: contain;
  padding: 3rem;
}
/* Each landing block pads 5-7rem above and below; trimmed so the hero, pillars, in-use banner and docs cards read as one page. */
.landing-hero .myst-landing-split-img-content-wrapper {
  padding-bottom: 2rem;
}
.landing-pillars .myst-landing-centered-inner {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.landing-in-use .myst-landing-justified {
  padding-block: 2rem;
}
.landing-docs .myst-landing-justified {
  padding-top: 2rem;
}
.landing-pillars .myst-card p {
  margin-block: 0.5rem;
}
