/* A quiet, paper-like palette inspired by the reference notes site. */
:root {
  --md-primary-fg-color: #20242a;
  --md-primary-fg-color--light: #5f6670;
  --md-primary-fg-color--dark: #111418;
  --md-accent-fg-color: #20242a;
  --md-default-bg-color: #ffffff;
  --md-default-fg-color: #20242a;
  --md-default-fg-color--light: #737b86;
  --md-typeset-a-color: #20242a;
}

/* Match the reference site's compact, centered three-column grid. */
.md-grid {
  max-width: 1220px;
}

body,
.md-main {
  background: #ffffff;
}

/* Keep the header white and restrained instead of using a saturated color. */
.md-header {
  background: rgb(255 255 255 / 0.92);
  border-bottom: 1px solid #edf0f2;
  box-shadow: 0 1px 0 rgb(15 23 42 / 0.04);
  color: #20242a;
  backdrop-filter: blur(8px);
}

.md-header__topic[data-md-component="header-topic"] {
  display: none;
}

.md-header .md-header__button,
.md-header .md-header__title,
.md-header .md-search__icon,
.md-header .md-source {
  color: #20242a;
}

.md-header .md-header__button:hover,
.md-header .md-header__button:focus,
.md-header .md-header__title:hover {
  color: #111418;
}

.md-header .md-search__form {
  background: #f1f2f4;
  border: 1px solid #e4e7ea;
  border-radius: 6px;
}

.md-header .md-search__input {
  color: #20242a;
}

.md-header .md-search__input::placeholder {
  color: #737b86;
}

/* The reference site has no tab band below the header. */
.md-tabs {
  display: none;
}

/* Let the sidebar read like a table of contents, not a separate card. */
@media screen and (min-width: 76.25em) {
  .md-sidebar--primary {
    padding-top: 22px;
    background: transparent;
    border: 0;
  }

  .md-sidebar--primary .md-nav__title {
    display: none;
  }

  .md-sidebar--primary .md-nav {
    padding: 0;
  }

  .md-sidebar--primary .md-nav__link {
    margin: 0;
    padding: 5px 0;
    border-radius: 3px;
    color: #4b535e;
    font-size: 14px;
  }

  .md-sidebar--primary .md-nav__link:hover,
  .md-sidebar--primary .md-nav__link:focus {
    background: transparent;
    color: #111418;
  }

  .md-sidebar--primary .md-nav__link--active {
    background: #f1f2f4;
    color: #111418;
    font-weight: 700;
    box-shadow: none;
  }

  /* Top-level folders become the small, uppercase group labels. */
  .md-sidebar--primary > .md-sidebar__scrollwrap > .md-sidebar__inner > .md-nav > .md-nav__list > .md-nav__item--nested > .md-nav__link {
    padding-top: 14px;
    padding-bottom: 6px;
    color: #20242a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .md-sidebar--primary .md-nav__item--nested > .md-nav__link .md-nav__icon {
    color: #20242a;
  }
}

/* Preserve the reference layout's open reading area; no floating white card. */
.md-main__inner {
  margin-top: 0;
}

.md-content__inner {
  margin: 0 24px 24px;
  padding: 14px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.md-typeset {
  letter-spacing: 0.01em;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  color: #16191d;
  font-weight: 700;
}

.md-typeset h1 {
  margin-bottom: 1.6em;
}

/* Keep the right-hand table of contents quiet and text-led. */
.md-sidebar--secondary {
  padding-left: 0;
}

.md-sidebar--secondary .md-nav__title {
  color: #20242a;
  font-weight: 700;
}

.md-sidebar--secondary .md-nav__link {
  color: #737b86;
}

.md-sidebar--secondary .md-nav__link:hover,
.md-sidebar--secondary .md-nav__link:focus,
.md-sidebar--secondary .md-nav__link--active {
  color: #20242a;
}

/* Keep comments visually attached to the article without making them a card. */
.giscus-comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #edf0f2;
}

.giscus,
.giscus-frame {
  width: 100%;
  max-width: 100%;
}

/* This is a notes site, not a documentation manual. */
.md-footer,
.md-footer-meta {
  display: none;
}

@media screen and (max-width: 76.234375em) {
  .md-content__inner {
    margin: 0 24px 24px;
    padding-top: 14px;
  }
}

@media screen and (max-width: 44.984375em) {
  .md-content__inner {
    margin: 0 16px 16px;
  }
}
