:root {
  --aexp-blue: #0754a5;
  --aexp-blue-dark: #003b78;
  --aexp-orange: #f59b2a;
  --aexp-paper: #fffef7;
  --aexp-ink: #111318;
  --aexp-shadow: #07182b;
  --md-primary-fg-color: var(--aexp-blue);
  --md-primary-fg-color--light: #2d72ba;
  --md-primary-fg-color--dark: var(--aexp-blue-dark);
  --md-accent-fg-color: #bd5b00;
  --md-default-bg-color: var(--aexp-paper);
  --md-default-fg-color: var(--aexp-ink);
  --md-typeset-a-color: #0054a8;
}

html {
  background: var(--aexp-blue-dark);
}

body {
  background-color: var(--aexp-blue);
  background-image:
    linear-gradient(45deg, rgb(255 255 255 / 3%) 25%, transparent 25%),
    linear-gradient(-45deg, rgb(0 0 0 / 4%) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgb(255 255 255 / 3%) 75%),
    linear-gradient(-45deg, transparent 75%, rgb(0 0 0 / 4%) 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.md-header {
  background: var(--aexp-paper);
  border-bottom: 3px solid var(--aexp-ink);
  color: var(--aexp-ink);
  box-shadow: 0 3px 0 var(--aexp-orange);
}

.md-header__title,
.md-tabs__link,
.md-nav__title,
.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.md-header__title {
  font-size: 0.95rem;
}

.md-header__button,
.md-header__topic,
.md-search__icon {
  color: var(--aexp-ink);
}

.md-search__form {
  background: #fff;
  border: 2px solid var(--aexp-ink);
  border-radius: 0;
  box-shadow: 3px 3px 0 var(--aexp-orange);
}

.md-search__input::placeholder {
  color: #454545;
}

.md-search__input {
  font-size: 0.85rem;
}

.md-container {
  background: transparent;
}

.md-main__inner {
  gap: 1.2rem;
}

@media screen and (min-width: 76.25em) {
  .md-grid {
    width: min(96vw, 100rem);
    max-width: none;
  }
}

.md-content {
  min-width: 0;
}

.md-typeset {
  font-size: 0.86rem;
}

.md-content__inner {
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem 2rem;
  background: var(--aexp-paper);
  border: 2px solid var(--aexp-ink);
  box-shadow: 7px 7px 0 var(--aexp-shadow);
}

.md-content__inner::before {
  display: block;
  height: 0.55rem;
  margin: -1.25rem -1.5rem 1.3rem;
  border-bottom: 2px solid var(--aexp-ink);
  background:
    repeating-linear-gradient(
      to bottom,
      var(--aexp-orange) 0,
      var(--aexp-orange) 2px,
      var(--aexp-paper) 2px,
      var(--aexp-paper) 4px
    );
  content: "";
}

.md-typeset h1 {
  margin-bottom: 1.2rem;
  color: var(--aexp-blue-dark);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}

/* The page URL already identifies the H1, so its permalink only adds layout
   noise when a long title wraps. Section permalinks remain unchanged. */
.md-typeset h1 .headerlink {
  display: none;
}

.md-typeset h2 {
  margin-top: 2.2rem;
  padding: 0.32rem 0.5rem;
  background: var(--aexp-blue);
  color: #fff;
  border: 2px solid var(--aexp-ink);
  box-shadow: 3px 3px 0 var(--aexp-orange);
}

.md-typeset h3 {
  color: var(--aexp-blue-dark);
  border-bottom: 2px solid var(--aexp-orange);
}

.md-typeset a {
  font-weight: 600;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

.md-typeset a:hover,
.md-typeset a:focus-visible {
  color: #a94d00;
}

.md-typeset img {
  max-height: 70vh;
  border: 2px solid var(--aexp-ink);
  box-shadow: 5px 5px 0 var(--aexp-orange);
}

.md-typeset table:not([class]) {
  border: 2px solid var(--aexp-ink);
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: 4px 4px 0 rgb(0 0 0 / 18%);
  font-size: 0.78rem;
}

.md-typeset table:not([class]) th {
  background: var(--aexp-blue);
  color: #fff;
  border-bottom-color: var(--aexp-ink);
}

.md-typeset table:not([class]) tr:nth-child(even) td {
  background: #edf3fa;
}

.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  border-right: 1px solid #7e8a96;
  border-bottom: 1px solid #aeb7c0;
}

.md-typeset kbd {
  display: inline-block;
  min-width: 1.3em;
  padding: 0.04em 0.26em;
  border: 1px solid var(--aexp-ink);
  border-radius: 0;
  background: #f7f3df;
  box-shadow: 1px 1px 0 #8e8a7a;
  color: var(--aexp-ink);
  font-family: inherit;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.md-typeset code {
  border: 1px solid rgb(0 0 0 / 16%);
  border-radius: 0;
  font-size: 0.92em;
}

.md-typeset pre > code {
  border: 0;
}

.highlight {
  border: 2px solid var(--aexp-ink);
  border-radius: 0;
  box-shadow: 4px 4px 0 var(--aexp-orange);
}

.md-sidebar__scrollwrap {
  background: rgb(255 254 247 / 96%);
  border: 2px solid var(--aexp-ink);
  box-shadow: 4px 4px 0 var(--aexp-shadow);
}

.md-nav {
  padding: 0.25rem;
  font-size: 0.75rem;
}

.md-nav__link--active,
.md-nav__link:is(:focus, :hover) {
  color: #9f4700;
}

.md-nav__item .md-nav__link--active {
  border-left: 0.2rem solid var(--aexp-orange);
  padding-left: 0.35rem;
}

.md-footer {
  border-top: 3px solid var(--aexp-ink);
  background: var(--aexp-blue-dark);
}

.md-footer-meta {
  background: #062f5b;
}

@media screen and (max-width: 76.2344em) {
  .md-sidebar__scrollwrap {
    border: 0;
    box-shadow: none;
  }
}

@media screen and (max-width: 44.9844em) {
  .md-content {
    max-width: 100vw;
    overflow: hidden;
  }

  .md-content__inner {
    width: calc(100vw - 1.6rem);
    max-width: calc(100vw - 1.6rem);
    padding: 1rem 0.75rem 1.5rem;
    border-right: 0;
    border-left: 0;
    box-shadow: 0 6px 0 var(--aexp-shadow);
  }

  .md-content__inner::before {
    margin: -1rem -0.75rem 1rem;
  }

  .md-typeset h2 {
    font-size: 1.05rem;
  }

  .md-typeset table:not([class]) {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body,
  .md-container {
    background: #fff;
  }

  .md-content__inner {
    border: 0;
    box-shadow: none;
  }
}
