/* ==========================================================================
   SITE MENU - ported 2026-09-16 from the main site's
   src/components/NewComponents/NewHeader/SiteMenu.module.css (live since 16:30Z).
   Markup: inc/ac-site-menu.php. Behaviour: assets/js/ac-site-menu.js.

   Mega-menu panel (>= 768px) / full-screen sheet (< 768px). Values are the
   website's, rule for rule, with the CSS-module class names prefixed "acsm-".
   px units on purpose (this theme pins html at 10px; the website uses px here).

   Blog-only additions, each marked "blog:":
     - font: the blog cannot load Nexa, so the panel uses the blog's own
       Instrument Sans (var(--font-secondary)) at the website's sizes/weights;
     - resets for the theme's global element rules (default.css `a`, `a:hover`
       red, `p`/`h2`/`h3` sizes, Bootstrap heading/paragraph margins);
     - .header-overlay is kept in header.php only because assets/js/script.js
       dereferences it without a null guard; it is never shown.

   Rollback: delete this file and its <link> in header.php.
   ========================================================================== */

/* blog: the legacy scrim that script.js toggles. The site menu has its own backdrop. */
.ac-header .header-overlay,
.ac-header .header-overlay.show {
  display: none !important;
}

/* blog: if ac-site-menu.js ever fails to load, script.js's legacy toggle would add
   Bootstrap's .overflow-hidden (!important) to <body> with no drawer left to show,
   freezing the page. ac-site-menu.js removes both classes on every click, so this
   only ever matches in that failure case. */
body.menu-open.overflow-hidden {
  overflow: visible !important;
}

.acsm-root {
  position: fixed;
  inset: 0;
  z-index: 1050;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 0.32s;
  font-family: var(--font-secondary, "Instrument Sans", sans-serif); /* blog: website uses Nexa */
  color: #14171a;
  line-height: 1.5; /* blog: pinned so theme body changes cannot move the panel */
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

.acsm-root.acsm-open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

/* blog: theme resets (default.css + Bootstrap reboot). */
.acsm-root *,
.acsm-root *::before,
.acsm-root *::after {
  box-sizing: border-box;
}

.acsm-root ul,
.acsm-root li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.acsm-root a {
  text-decoration: none;
}

.acsm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 28, 64, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.acsm-open .acsm-backdrop {
  opacity: 1;
}

/* PANEL */

.acsm-panel {
  position: relative;
  max-width: 1360px;
  margin: 0 auto;
  padding: 10px 24px 14px;
  border-radius: 32px;
  background:
    radial-gradient(120% 60% at 12% 0%, rgba(197, 224, 255, 0.75) 0%, rgba(197, 224, 255, 0) 60%),
    radial-gradient(90% 50% at 100% 0%, rgba(233, 226, 247, 0.8) 0%, rgba(233, 226, 247, 0) 55%),
    linear-gradient(180deg, #f3f8ff 0%, #ffffff 42%);
  box-shadow:
    0 30px 80px rgba(8, 28, 64, 0.28),
    0 2px 0 rgba(255, 255, 255, 0.8) inset;
  opacity: 0;
  transform: translateY(-14px) scale(0.985);
  transform-origin: top right;
  transition:
    opacity 0.28s ease,
    transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.acsm-open .acsm-panel {
  opacity: 1;
  transform: none;
}

/* Soft staggered reveal of the cards. */
.acsm-card {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.34s ease var(--sm-delay, 0ms),
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) var(--sm-delay, 0ms),
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.acsm-open .acsm-card {
  opacity: 1;
  transform: none;
}

/* TOP BAR */

.acsm-top {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  margin-bottom: 6px;
}

.acsm-logo,
.acsm-logo:hover {
  display: flex;
  align-items: center;
  width: 180px;
  color: #14171a;
  border-radius: 12px;
  transition: none; /* blog: default.css animates every <a> */
}

.acsm-logo svg {
  display: block;
  width: 100%;
  height: auto;
}

.acsm-mobile-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.acsm-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.acsm-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 100px;
  background: #fff1f0;
  box-shadow: inset 0 0 0 1px rgba(196, 43, 43, 0.22);
  color: #b3261e;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.acsm-help-lead {
  font-weight: 400;
  color: #7f1d17;
}

.acsm-help-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5484d;
  box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.18);
}

.acsm-help:hover {
  background: #ffe2df;
  color: #8f1d17;
}

.acsm-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin: 0;
  padding: 0 20px 0 14px;
  border: 1px solid #d9e4f2;
  border-radius: 100px;
  background: #ffffff;
  color: #14171a;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(8, 28, 64, 0.08);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.acsm-close:hover {
  background: #edf3ff;
  border-color: #b9cdf0;
}

.acsm-close-icon {
  display: flex;
}

.acsm-close-icon svg {
  width: 20px;
  height: 20px;
}

/* GRID */

.acsm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.acsm-card {
  position: relative;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(13, 80, 181, 0.09);
  box-shadow: 0 10px 28px rgba(14, 20, 23, 0.05);
}

.acsm-stage,
.acsm-learn {
  padding: 16px 12px 12px;
  background: linear-gradient(180deg, var(--sm-stage-tint) 0%, #ffffff 120px);
  border-color: color-mix(in srgb, var(--sm-stage) 18%, transparent);
}

.acsm-stage::before,
.acsm-learn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--sm-stage);
  opacity: 0.85;
}

.acsm-stage-calm,
.acsm-stage-control {
  grid-column: span 1;
}

.acsm-stage-daily {
  grid-column: span 2;
}

.acsm-stage-icon {
  filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--sm-stage) 28%, transparent));
}

.acsm-learn {
  grid-column: span 2;
}

.acsm-stage-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 6px;
}

.acsm-stage-titles {
  min-width: 0;
}

.acsm-root .acsm-stage-step {
  margin: 0 0 2px;
  color: var(--sm-stage-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}

.acsm-root .acsm-stage-title {
  margin: 0;
  color: #14171a;
  font-family: inherit;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.15;
}

.acsm-root .acsm-stage-tagline {
  margin: 2px 0 0;
  color: #5b5a5d;
  font-size: 14px;
  line-height: 1.3;
}

.acsm-stage-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 100px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sm-stage) 30%, transparent);
  color: var(--sm-stage-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.acsm-stage-all:hover {
  background: var(--sm-stage-ink);
  color: #ffffff;
}

.acsm-arrow {
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.acsm-stage-all:hover .acsm-arrow,
.acsm-companion:hover .acsm-arrow {
  transform: translateX(3px);
}

/* ITEMS */

.acsm-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.acsm-stage-daily .acsm-items {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 6px;
}

.acsm-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 7px 8px;
  border-radius: 16px;
  color: #14171a;
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.acsm-item:hover {
  background: color-mix(in srgb, var(--sm-stage, #0d50b5) 8%, #ffffff);
  color: #14171a;
}

.acsm-item[aria-current="page"] {
  background: color-mix(in srgb, var(--sm-stage, #0d50b5) 11%, #ffffff);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--sm-stage, #0d50b5) 55%, transparent);
}

.acsm-item[aria-current="page"] .acsm-item-label::after {
  /* Visual cue only: aria-current already tells assistive tech. */
  content: "You are here";
  content: "You are here" / "";
  margin-left: 2px;
  color: var(--sm-stage-ink, #0d50b5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.acsm-icon {
  display: block;
  flex: 0 0 auto;
}

.acsm-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.acsm-item-icon {
  border-radius: 12px;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.acsm-item:hover .acsm-item-icon {
  transform: scale(1.08) rotate(-3deg);
}

.acsm-item-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.acsm-item-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.acsm-item-text {
  color: #5b5a5d;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.3;
}

.acsm-free {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 100px;
  background: #e3f6e8;
  box-shadow: inset 0 0 0 1px rgba(23, 105, 42, 0.14);
  color: #17692a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

/* UNDERSTAND YOUR ANXIETY */

.acsm-learn-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}

.acsm-university-link .acsm-item-label {
  font-size: 18px;
}

.acsm-root .acsm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 6px;
  padding: 0 8px;
  list-style: none;
}

.acsm-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--sm-stage-tint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sm-stage) 22%, transparent);
  color: var(--sm-stage-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.acsm-chip:hover {
  background: var(--sm-stage-ink);
  color: #ffffff;
}

.acsm-root .acsm-learn-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 6px;
  margin: 0;
  padding: 6px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--sm-stage) 14%, transparent);
  list-style: none;
}

/* AI CBT COMPANION */

.acsm-companion {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px 20px 18px;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(140% 90% at 100% 0%, rgba(97, 209, 249, 0.45) 0%, rgba(97, 209, 249, 0) 55%),
    linear-gradient(150deg, #0d50b5 0%, #2563e8 70%, #3c7dff 100%);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 16px 36px rgba(13, 80, 181, 0.28);
}

.acsm-companion::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.acsm-companion:hover {
  color: #ffffff;
  box-shadow: 0 22px 44px rgba(13, 80, 181, 0.36);
}

.acsm-companion-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.acsm-companion-icon {
  margin: -4px 0 0 -6px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18));
}

.acsm-companion-badge {
  padding: 5px 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.acsm-companion-eyebrow {
  margin-top: 4px;
  color: #cfe3ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.acsm-companion-title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.15;
}

.acsm-companion-text {
  text-wrap: pretty;
  color: #e6efff;
  font-size: 14px;
  line-height: 1.4;
}

.acsm-companion-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.acsm-companion[aria-current="page"] {
  box-shadow:
    0 0 0 3px #ffffff,
    0 0 0 5px #0d50b5;
}

/* GET THE APP */

.acsm-download {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 20px 18px;
  overflow: hidden;
  background:
    radial-gradient(100% 80% at 0% 100%, rgba(255, 204, 0, 0.18) 0%, rgba(255, 204, 0, 0) 60%),
    linear-gradient(160deg, #e2f1ff 0%, #edf6ff 55%, #ffffff 100%);
  border-color: #cfe1f7;
}

/* The real app home screen, peeking in from the top of the card. */
.acsm-phone {
  position: relative;
  display: block;
  flex: 0 0 auto;
  height: 104px;
  margin: 0 -20px 4px;
  overflow: hidden;
  background:
    radial-gradient(60% 90% at 50% 100%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #cfe5ff 0%, #e2f1ff 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
}

.acsm-phone img {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  display: block;
  width: 190px;
  max-width: none;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 10px 18px rgba(13, 80, 181, 0.22));
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.acsm-download:hover .acsm-phone img {
  transform: translateY(-6px);
}

.acsm-root .acsm-download-title {
  margin: 0;
  text-wrap: balance;
  color: #14171a;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

.acsm-root .acsm-download-text {
  margin: 0;
  color: #3d4247;
  font-size: 14px;
  line-height: 1.4;
}

.acsm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.acsm-badge {
  display: block;
  border-radius: 10px;
  transition: transform 0.2s ease;
}

.acsm-badge:hover {
  transform: translateY(-2px);
}

.acsm-badge img {
  display: block;
  width: auto;
  height: 42px;
}

.acsm-root .acsm-download-note {
  margin: 2px 0 0;
  color: #5b5a5d;
  font-size: 13px;
  line-height: 1.3;
}

/* BOTTOM BAR */

.acsm-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 2px 8px 0;
}

.acsm-root .acsm-small-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.acsm-small-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 100px;
  color: #3d4247;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(61, 66, 71, 0.35);
  transition: none; /* blog: default.css animates every <a> */
}

.acsm-root .acsm-small-link {
  text-decoration: underline;
}

.acsm-small-link:hover {
  color: #0d50b5;
  text-decoration-color: currentColor;
}

.acsm-small-link[aria-current="page"] {
  color: #0d50b5;
  font-weight: 700;
}

.acsm-root .acsm-mission {
  margin: 0;
  color: #5b5a5d;
  font-size: 14px;
  font-style: italic;
  line-height: 1.3;
}

/* FOCUS */

.acsm-root a:focus-visible,
.acsm-root button:focus-visible {
  outline: 3px solid #0d50b5;
  outline-offset: 2px;
}

.acsm-companion:focus-visible {
  outline-color: #0d50b5 !important;
  outline-offset: 3px !important;
}

.acsm-help:focus-visible {
  outline-color: #b3261e !important;
}

/* RESPONSIVE */

@media (max-width: 1199px) {
  .acsm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acsm-stage,
  .acsm-stage-daily,
  .acsm-learn {
    grid-column: 1 / -1;
  }

  .acsm-stage .acsm-items,
  .acsm-stage-daily .acsm-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 6px;
  }
}

@media (max-width: 991px) {
  .acsm-help-lead {
    display: none;
  }
}

@media (max-width: 767px) {
  .acsm-root {
    padding: 0;
  }

  .acsm-panel {
    min-height: 100%;
    padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px));
    border-radius: 0;
    transform: translateY(18px);
    background:
      radial-gradient(140% 40% at 0% 0%, rgba(197, 224, 255, 0.8) 0%, rgba(197, 224, 255, 0) 60%),
      linear-gradient(180deg, #f3f8ff 0%, #ffffff 30%);
  }

  .acsm-top {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 64px;
    margin: 0 -16px 8px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px;
    background: rgba(243, 248, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(13, 80, 181, 0.08);
  }

  .acsm-logo,
  .acsm-logo:hover {
    width: 128px;
  }

  .acsm-help {
    min-height: 40px;
    padding: 0 12px;
    font-size: 14px;
  }

  .acsm-close {
    justify-content: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
  }

  .acsm-close-text {
    display: none;
  }

  .acsm-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .acsm-stage,
  .acsm-learn {
    padding: 14px 8px 8px;
  }

  .acsm-stage-head {
    flex-wrap: wrap;
    padding: 0 6px 8px;
  }

  .acsm-stage-all {
    margin-left: 0;
    padding: 6px 12px;
    font-size: 13px;
  }

  .acsm-stage .acsm-items,
  .acsm-stage-daily .acsm-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .acsm-stage .acsm-item {
    gap: 8px;
    min-height: 52px;
    padding: 6px;
  }

  .acsm-stage .acsm-item-text {
    display: none;
  }

  .acsm-item-label {
    font-size: 14.5px;
  }

  .acsm-item[aria-current="page"] .acsm-item-label::after {
    display: none;
  }

  .acsm-root .acsm-learn-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .acsm-phone {
    height: 104px;
    margin: 0 -16px 4px;
  }

  .acsm-companion {
    padding: 16px;
  }

  .acsm-download {
    padding: 0 16px 16px;
  }

  .acsm-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }
}

@media (max-width: 380px) {
  .acsm-logo,
  .acsm-logo:hover {
    width: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .acsm-root,
  .acsm-backdrop,
  .acsm-panel,
  .acsm-card,
  .acsm-item,
  .acsm-item-icon,
  .acsm-phone img,
  .acsm-arrow,
  .acsm-badge {
    transition: none !important;
  }

  .acsm-panel,
  .acsm-card,
  .acsm-open .acsm-panel,
  .acsm-open .acsm-card {
    transform: none;
  }

  .acsm-item:hover .acsm-item-icon,
  .acsm-download:hover .acsm-phone img,
  .acsm-badge:hover,
  .acsm-stage-all:hover .acsm-arrow,
  .acsm-companion:hover .acsm-arrow {
    transform: none;
  }
}
