:root {
  --product-canvas: #F6F7F5;
  --product-surface: #FFFFFF;
  --product-ink: #1F2933;
  --product-muted: #5B6870;
  --product-border: #CDD5D5;
  --product-primary: #0B5D5A;
  --product-primary-hover: #084946;
  --product-focus: #0A7A75;
  --product-success: #176B45;
  --product-warning: #8A5A00;
  --product-danger: #A43232;
  --product-info: #1D5D88;
}

.product-header {
  position: fixed;
  z-index: 1031;
  top: 0;
  right: 0;
  left: 0;
  min-height: 57px;
  background: var(--product-surface);
  border-bottom: 1px solid var(--product-border);
  color: var(--product-ink);
  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.product-header__nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 1440px;
  min-height: 56px;
  padding: 0 1rem;
  margin: 0 auto;
}

.product-header a,
.product-header summary {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  color: var(--product-ink);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

.product-header a:hover {
  color: var(--product-primary-hover);
}

.product-header a:focus-visible,
.product-header summary:focus-visible {
  outline: 3px solid var(--product-focus);
  outline-offset: -3px;
}

.product-header__brand {
  gap: 0.55rem;
  padding-left: 0;
}

.product-header__mark {
  display: block;
  flex: 0 0 auto;
  height: 32px;
  width: 32px;
}

.product-header__title {
  color: var(--product-ink);
  font-weight: 700;
  white-space: nowrap;
}

.product-header__desktop-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.product-header__link--active {
  border-bottom: 3px solid var(--product-primary);
}

.product-header__account-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.product-header__primary-action {
  background: var(--product-primary);
  color: var(--product-surface) !important;
}

.product-header__primary-action:hover {
  background: var(--product-primary-hover);
}

.product-header__mobile-menu {
  display: none;
  position: relative;
  margin-left: auto;
}

.product-header__mobile-menu summary {
  justify-content: center;
  width: 44px;
  cursor: pointer;
  list-style: none;
}

.product-header__mobile-menu summary::-webkit-details-marker {
  display: none;
}

.product-header__mobile-links {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  display: grid;
  min-width: 12rem;
  padding: 0.25rem;
  background: var(--product-surface);
  border: 1px solid var(--product-border);
}

.product-header__mobile-links a {
  width: 100%;
}

body.mpi-lms-integrated.nav-sidebar {
  padding-top: 57px;
}

body.mpi-lms-integrated #quarto-header {
  top: 57px;
}

@media (max-width: 640px) {
  .product-header__title,
  .product-header__desktop-links,
  .product-header__account-actions {
    display: none;
  }

  .product-header__mobile-menu {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-header,
  body.mpi-lms-integrated #quarto-header {
    transition: none !important;
  }
}

/* Presentation correction for the accepted October 1 publication. Quarto
   rewrites inline body/sidebar offsets using only its secondary navigation. */
body.mpi-lms-integrated main .lms-progress {
  position: static !important;
  grid-column: body;
  float: none;
  width: auto;
  max-width: 100%;
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--product-border);
  border-radius: .5rem;
  background: var(--product-canvas);
  font-size: .9rem;
}

body.mpi-lms-integrated main .lms-progress h2 {
  margin: 0 0 .5rem;
  padding: 0;
  border: 0;
  font-size: 1rem;
}

body.mpi-lms-integrated main .lms-progress p:last-child {
  margin-bottom: 0;
}

body.mpi-lms-integrated {
  --mpi-product-header-height: 4rem;
  --mpi-secondary-header-height: 3rem;
  padding-top: var(--mpi-product-header-height) !important;
}

body.mpi-lms-integrated .product-header {
  height: var(--mpi-product-header-height);
  min-height: var(--mpi-product-header-height);
}

body.mpi-lms-integrated .product-header__nav {
  height: calc(var(--mpi-product-header-height) - 1px);
  min-height: calc(var(--mpi-product-header-height) - 1px);
}

body.mpi-lms-integrated #quarto-header {
  top: var(--mpi-product-header-height);
}

body.mpi-lms-integrated .sidebar {
  top: var(--mpi-product-header-height) !important;
  max-height: calc(100vh - var(--mpi-product-header-height)) !important;
}

body.mpi-lms-integrated #quarto-document-content [id] {
  scroll-margin-top: calc(var(--mpi-product-header-height) + 1rem);
}

@media (max-width: 991.98px) {
  body.mpi-lms-integrated {
    padding-top: calc(var(--mpi-product-header-height) + var(--mpi-secondary-header-height)) !important;
  }

  body.mpi-lms-integrated #quarto-header .quarto-secondary-nav {
    height: var(--mpi-secondary-header-height);
    min-height: var(--mpi-secondary-header-height);
  }

  body.mpi-lms-integrated .sidebar {
    top: calc(var(--mpi-product-header-height) + var(--mpi-secondary-header-height)) !important;
    max-height: calc(100vh - var(--mpi-product-header-height) - var(--mpi-secondary-header-height)) !important;
  }

  body.mpi-lms-integrated .product-header__title,
  body.mpi-lms-integrated .product-header__desktop-links,
  body.mpi-lms-integrated .product-header__account-actions {
    display: none;
  }

  body.mpi-lms-integrated .product-header__mobile-menu {
    display: block;
  }

  body.mpi-lms-integrated #quarto-document-content [id] {
    scroll-margin-top: calc(var(--mpi-product-header-height) + var(--mpi-secondary-header-height) + 1rem);
  }
}
