/* Preserve Zensical's neutral reading surfaces and teal accents. */
.stax-hero h1 {
  color: var(--md-default-fg-color);
}

[data-md-color-scheme="slate"] .stax-hero h1 {
  color: #fff;
}

[data-md-color-scheme="slate"] .md-logo img,
[data-md-color-scheme="slate"] .stax-hero__mark img {
  filter: brightness(0) invert(1);
}

.md-grid {
  max-width: 96rem;
}

.md-header__inner {
  min-height: 3.6rem;
  padding-inline: 1rem;
}

.md-header__title {
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -.035em;
}

/* Keep project branding in the header when a page scrolls. */
.md-header__topic:first-child {
  position: static;
  opacity: 1;
  transform: none;
}

.md-header__topic + .md-header__topic {
  display: none;
}

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

.md-search__button {
  min-height: 2.3rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .5rem;
  text-align: left;
}

.md-nav {
  font-size: .76rem;
  line-height: 1.6;
}

.md-nav--primary > .md-nav__list > .md-nav__item--nested {
  margin-block: 0 1rem;
}

.md-nav--primary > .md-nav__list > .md-nav__item--nested > .md-nav__link {
  margin: 0;
  padding: .4rem .6rem;
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.4;
}

.md-nav--primary > .md-nav__list > .md-nav__item--nested > .md-nav > .md-nav__list {
  margin-left: .6rem;
  padding-left: .4rem;
  border-left: 1px solid var(--md-default-fg-color--lightest);
}

.md-nav--primary .md-nav[data-md-level="1"] .md-nav__link {
  margin: .05rem 0;
  padding: .3rem .5rem;
  border-radius: .25rem;
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.5;
}

.md-nav--primary .md-nav[data-md-level="1"] .md-nav__link--active {
  background: var(--md-default-fg-color--lightest);
  font-weight: 650;
}

.md-nav--secondary {
  border-left: 1px solid var(--md-default-fg-color--lightest);
  padding-left: .8rem;
}

.md-typeset {
  font-size: .85rem;
  line-height: 1.8;
}

.md-typeset h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  font-weight: 750;
  letter-spacing: -.045em;
}

.md-typeset h2 {
  margin-top: 2.4rem;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.3;
}

.md-typeset h3 {
  font-weight: 650;
  letter-spacing: -.015em;
}

.md-typeset pre > code,
.md-typeset .admonition {
  border-radius: .5rem;
}

.md-typeset a:focus-visible,
.md-nav__link:focus-visible,
.md-header__button:focus-visible {
  outline: 2px solid var(--md-accent-fg-color);
  outline-offset: 4px;
}

.stax-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, .6fr);
  gap: 2rem;
  align-items: center;
  min-height: 24rem;
  padding-block: 3rem 4rem;
}

.stax-eyebrow {
  margin: 0 0 1rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.md-typeset .stax-hero h1 {
  margin: 0 0 1.4rem;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
}

.stax-hero__lead {
  max-width: 33rem;
  font-size: 1rem;
  line-height: 1.65;
}

.stax-hero__credit {
  font-size: .75rem;
}

.stax-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem 1.4rem;
  margin-top: 1.8rem;
}

.md-typeset .stax-button {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: .45rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 0;
  transform: skewX(-12deg);
  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  font-size: .8rem;
  font-weight: 650;
  text-decoration: none;
}

.stax-button > span {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  transform: skewX(12deg);
}

.md-typeset .stax-button:hover {
  background: var(--md-primary-fg-color);
  border-color: transparent;
  color: var(--md-primary-bg-color);
  filter: brightness(1.08);
}

.stax-actions > a:not(.stax-button) {
  font-size: .8rem;
  font-weight: 600;
}

.stax-hero__mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.stax-hero__mark img {
  width: min(100%, 14rem);
  height: auto;
}

.stax-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
}

.stax-tags span {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 2rem;
  padding: .2rem .65rem;
  font-size: .65rem;
}

.stax-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stax-card {
  padding: 1.5rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .65rem;
}

.md-typeset .stax-card h2 {
  margin: .4rem 0 .8rem;
  font-size: 1.25rem;
}

.stax-card p {
  margin-bottom: 0;
}

.stax-card__label {
  font-size: .65rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (min-width: 76.25em) {
  .md-header__inner {
    display: grid;
    grid-template-columns: 2.4rem minmax(11rem, 1fr) minmax(16rem, 30rem) minmax(3rem, 1fr);
    gap: .5rem;
  }

  .md-header__title {
    margin: 0;
  }

  .md-search {
    grid-column: 3;
    grid-row: 1;
    width: 100%;
    margin: 0;
  }

  .md-search__button {
    width: 100%;
  }

  .md-header__option {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
  }

  .md-header__source:empty {
    display: none;
  }

  .md-sidebar--primary {
    width: 14rem;
    min-height: calc(100dvh - 3.6rem);
    padding-inline: .6rem;
    border-right: 1px solid var(--md-default-fg-color--lightest);
  }

  .md-sidebar--primary .md-sidebar__inner {
    width: auto;
  }

  .md-content {
    min-width: 0;
    padding-inline: 1.6rem;
  }

  .md-main__inner {
    margin-top: 0;
  }

  .md-content__inner {
    margin-top: 2.8rem;
  }
  .md-main__inner:has(.stax-home) .md-content__inner {
    margin-top: 0;
  }

}

@media (max-width: 60em) {
  .stax-hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-block: 2rem;
  }

  .stax-hero__mark {
    display: none;
  }
}

@media (max-width: 40em) {
  .md-header__inner {
    min-height: 3rem;
    padding-inline: .3rem;
  }

  .stax-cards {
    grid-template-columns: 1fr;
  }

  .stax-card {
    padding: 1.2rem;
  }

  .md-typeset .stax-hero h1 {
    font-size: 2.5rem;
  }
}
