/**
 * Mobile navigation menu — styles for src/mobile-menu.js.
 *
 * Everything is scoped to .n-mm* class names, so nothing here can collide with
 * the design's inline styles. The toggle and panel are display:none above the
 * breakpoint, which is also what keeps them out of the desktop layout entirely.
 */

/* Hidden by default; only the mobile breakpoint reveals them. */
.n-mm-toggle { display: none; }
.n-mm { display: none; }

@media (max-width: 860px) {

  /* ---------------- hamburger ---------------- */
  .n-mm-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    margin-left: auto;
    border: 1px solid var(--c-hairline, #d7e7f3);
    border-radius: var(--r-md, 8px);
    background: var(--c-canvas, #fff);
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .n-mm-bar {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 2px;
    background: var(--c-primary, #174f9a);
    transition: transform .22s ease, opacity .18s ease;
  }
  .n-mm-toggle[aria-expanded="true"] .n-mm-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .n-mm-toggle[aria-expanded="true"] .n-mm-bar:nth-child(2) { opacity: 0; }
  .n-mm-toggle[aria-expanded="true"] .n-mm-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* ---------------- panel ---------------- */
  /* Anchored under the sticky header rather than covering it, so the logo and
     the close affordance stay visible while the menu is open.

     Open/closed is plain `display`, with NO transition or animation.
     The app re-renders continuously, and under that churn both a
     transition (pinned in playState "running" with fill "backwards") and a
     one-shot keyframe animation (restarted before it could finish) held their
     *from* values — opacity 0 — producing a panel that was in the DOM,
     matched its CSS rule, and still never appeared. An instant open is not
     worth reintroducing that failure mode. */
  .n-mm-open {
    display: block;
    position: fixed;
    top: var(--n-mm-top, 64px);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--c-canvas, #fff);
    z-index: 90;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--c-hairline, #d7e7f3);
  }
  .n-mm-inner { padding: 6px 16px 40px; }

  /* ---------------- sections ---------------- */
  .n-mm-section { border-bottom: 1px solid var(--c-hairline, #d7e7f3); }
  .n-mm-section-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 2px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-display, sans-serif);
    font-size: 19px;
    font-weight: 400;
    color: var(--c-primary, #174f9a);
    text-align: left;
    -webkit-tap-highlight-color: transparent;
  }
  .n-mm-chev {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: .6;
    transition: transform .2s ease;
  }
  .n-mm-section-open .n-mm-chev { transform: rotate(180deg); }

  /* Collapsed by default — expanded, the panel is a wall of ~60 links. */
  .n-mm-body { display: none; padding: 0 0 12px; }
  .n-mm-section-open .n-mm-body { display: block; }

  .n-mm-heading {
    margin: 12px 0 4px;
    font-family: var(--font-body, sans-serif);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--c-ink-mute-2, #6f829a);
  }
  .n-mm-link {
    display: block;
    padding: 11px 2px;          /* >= 44px tap target with the two lines */
    text-decoration: none;
    border-radius: var(--r-sm, 6px);
  }
  .n-mm-link:active { background: var(--c-canvas-panel, #edf7fd); }
  .n-mm-link-title {
    display: block;
    font-family: var(--font-body, sans-serif);
    font-size: 15px;
    font-weight: 600;
    color: var(--c-primary, #174f9a);
    line-height: 1.3;
  }
  .n-mm-link-desc {
    display: block;
    margin-top: 2px;
    font-family: var(--font-body, sans-serif);
    font-size: 12.5px;
    color: var(--c-ink-mute, #4f6480);
    line-height: 1.35;
  }

  /* ---------------- footer CTAs ---------------- */
  .n-mm-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 22px;
  }
  .n-mm-cta-primary,
  .n-mm-cta-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: var(--r-pill, 9999px);
    font-family: var(--font-body, sans-serif);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
  }
  .n-mm-cta-primary {
    background: var(--c-primary, #174f9a);
    color: #fff;
  }
  .n-mm-cta-ghost {
    background: var(--c-canvas, #fff);
    color: var(--c-primary, #174f9a);
    border: 1px solid var(--c-hairline-input, #9fd5ee);
  }

  @media (prefers-reduced-motion: reduce) {
    .n-mm-bar, .n-mm-chev { transition: none !important; }
  }
}
