/* PrecepTron brand palette — matches the logo. */
:root {
  --preceptron-navy: #1f4e79;
  --preceptron-navy-dark: #163a5c;
  --preceptron-teal: #4fb3bf;
  --preceptron-teal-light: #6fc6d0;
}

[data-md-color-scheme="default"][data-md-color-primary="custom"] {
  --md-primary-fg-color:        var(--preceptron-navy);
  --md-primary-fg-color--light: var(--preceptron-teal);
  --md-primary-fg-color--dark:  var(--preceptron-navy-dark);
  --md-primary-bg-color:        #ffffff;
  --md-primary-bg-color--light: #ffffffb3;
}

/* Header uses a white background so the transparent navy+teal logo is
   visible. Header text/icons switch to navy for contrast. */
.md-header {
  background-color: #ffffff;
  color: var(--preceptron-navy);
  border-bottom: 1px solid rgba(31, 78, 121, 0.12);
}

.md-header[data-md-state="shadow"] {
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.07), 0 4px 8px rgba(0, 0, 0, 0.05);
}

.md-header__button,
.md-header__title,
.md-header__topic,
.md-search__input,
.md-search__input::placeholder {
  color: var(--preceptron-navy);
}

.md-search__input {
  background-color: rgba(31, 78, 121, 0.08);
}

.md-search__input::placeholder {
  color: rgba(31, 78, 121, 0.6);
}

.md-tabs {
  background-color: #ffffff;
  color: var(--preceptron-navy);
  border-bottom: 1px solid rgba(31, 78, 121, 0.12);
}

.md-tabs__link {
  color: var(--preceptron-navy);
  opacity: 0.75;
}

.md-tabs__link:hover,
.md-tabs__link--active {
  opacity: 1;
  color: var(--preceptron-navy);
}

[data-md-color-scheme="default"][data-md-color-accent="custom"] {
  --md-accent-fg-color:             var(--preceptron-teal);
  --md-accent-fg-color--transparent: rgba(79, 179, 191, 0.1);
  --md-accent-bg-color:             #ffffff;
  --md-accent-bg-color--light:      #ffffffb3;
}

/* The header logo IS the wordmark — hide the duplicate "PrecepTron" text
   that Material renders next to it, and let the image fill the header. */
.md-header__title {
  display: none;
}

/* Force the header logo to render at every viewport width — Material hides
   it below ~76em by default. */
.md-header__button.md-logo {
  display: inline-flex !important;
  align-items: center;
  margin: 0.2rem 0.4rem 0.2rem 0;
  padding: 0;
}

/* Pull the drawer toggle (hamburger) to the far left of the header. */
.md-header__button.md-icon[for="__drawer"] {
  order: -1;
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.8rem;
  width: auto;
  max-width: none;
  object-fit: contain;
}

/* The drawer (left nav) title area also renders the logo, and its default
   background is the primary navy — which hides the navy half of the
   transparent wordmark. Force it white so the full logo is visible. */
.md-nav--primary .md-nav__title,
.md-nav--primary > .md-nav__title[for="__drawer"] {
  background-color: #ffffff;
  color: var(--preceptron-navy);
}

/* Drawer title renders the wordmark logo by default — too wide and too
   tall. Hide the image and swap in the square icon via background-image. */
.md-nav--primary .md-nav__title .md-nav__button.md-logo img,
.md-nav--primary .md-nav__title .md-nav__button.md-logo svg {
  display: none;
}

.md-nav--primary .md-nav__title .md-nav__button.md-logo {
  display: block;
  width: 2.4rem;
  height: 2.4rem;
  margin: 0 auto 0.4rem;
  background-image: url("icon.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Drawer nav items should also be navy on white, matching the header. */
.md-nav__link {
  color: var(--preceptron-navy);
}

.md-nav__link--active,
.md-nav__link:focus,
.md-nav__link:hover {
  color: var(--preceptron-teal);
}
