/* Standalone course landing pages: shared, progressive header navigation.
   Native details/summary works without JavaScript. No global site selectors. */
.ypm-course-menu {
  position: relative;
  flex: 0 0 auto;
  margin-inline-start: auto;
  font-family: inherit;
  color: #244c42;
}
.ypm-course-menu__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  box-sizing: border-box;
  list-style: none;
  cursor: pointer;
  background: #f8f5ed;
  border: 1px solid #c7b99c;
  border-radius: 10px;
  color: #244c42;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}
.ypm-course-menu__trigger::-webkit-details-marker { display: none; }
.ypm-course-menu__trigger::marker { content: ''; }
.ypm-course-menu__trigger:hover,
.ypm-course-menu[open] .ypm-course-menu__trigger { background: #ece7db; }
.ypm-course-menu__trigger:focus-visible,
.ypm-course-menu__panel a:focus-visible {
  outline: 3px solid #a67c36;
  outline-offset: 3px;
}
.ypm-course-menu__icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.ypm-course-menu__panel {
  position: absolute;
  z-index: 60;
  inset-inline-end: 0;
  top: calc(100% + 0.5rem);
  display: grid;
  gap: 0.15rem;
  width: min(19rem, calc(100vw - 2rem));
  max-height: min(75vh, 32rem);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 0.6rem;
  background: #fffdf8;
  border: 1px solid #c7b99c;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(25, 46, 38, 0.2);
  text-align: start;
}
.ypm-course-menu__panel a {
  display: block;
  padding: 0.66rem 0.8rem;
  border-radius: 7px;
  color: #244c42;
  background: transparent;
  text-decoration: none;
  font-size: 0.93rem;
  line-height: 1.5;
}
.ypm-course-menu__panel a:hover { background: #f0eadc; }
@media (max-width: 600px) {
  body.ypm-return-to-self .site-header__inner,
  body.ypm-am .site-header__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.35rem;
  }
  body.ypm-yn .site-header__inner { gap: 0.45rem; }
  body.ypm-return-to-self .brand,
  body.ypm-am .brand { min-width: 0; gap: 0.4rem; }
  body.ypm-return-to-self .brand__text,
  body.ypm-am .brand__text {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.84rem;
    letter-spacing: 0;
  }
  body.ypm-return-to-self .lang-switch__item,
  body.ypm-am .lang-switch__item { padding-inline: 0.45rem; }
  .ypm-course-menu { margin-inline-start: 0; }
  /* A viewport-width panel avoids overflow from narrow logo/language rows. */
  .ypm-course-menu__panel {
    position: fixed;
    inset-inline: 1rem;
    top: 4.75rem;
    width: auto;
  }
}
@media (max-width: 520px) {
  .ypm-course-menu__label { display: none; }
  .ypm-course-menu__trigger { padding-inline: 0.65rem; }
}
@media print {
  .ypm-course-menu { display: none !important; }
}
