/* 2026-11-17 Phone / tablet menu (user's design: side drawer, 56px rows, round gold chevrons,
   one sub-menu open at a time, gold bar on the current section, Donate + 80G note at the bottom).
   Desktop menu untouched. High-contrast mode (html.hc) keeps the plain accessible menu. */
.site-nav__foot { display: none; }

@media (max-width: 1199px) {
  html:not(.hc) body .site-nav__overlay { display: block !important; background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .25s; }
  html:not(.hc) body .site-nav__overlay[hidden] { display: block !important; }
  html:not(.hc) body .site-nav.is-open .site-nav__overlay { opacity: 1; pointer-events: auto; }

  html:not(.hc) body .site-nav__panel {
    width: min(86vw, 360px); max-width: none; background: #1b261d !important; display: flex; flex-direction: column;
    transform: translateX(-102%); transition: transform .28s ease; box-shadow: 8px 0 30px rgba(0, 0, 0, .4);
    padding-top: env(safe-area-inset-top, 0px); overflow: hidden;
  }
  html:not(.hc) body .site-nav.is-open .site-nav__panel { transform: none; }

  html:not(.hc) body .site-nav__panel-head { padding: 16px 20px 16px 24px; flex: none; }
  html:not(.hc) body .site-nav__close {
    width: 44px !important; height: 44px !important; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08) !important;
    background: transparent; color: #f3f1e6 !important; font-size: 26px; display: grid; place-items: center;
  }

  html:not(.hc) body .site-nav__list { flex: 1; overflow-y: auto; padding: 8px 14px; margin: 0; overscroll-behavior: contain; }
  html:not(.hc) body .site-nav__list > .nav-item { border: 0 !important; }
  html:not(.hc) body .site-nav__list > .nav-item + .nav-item { margin-top: 4px; }
  html:not(.hc) body .site-nav__list > .nav-item--donate { display: none; }

  html:not(.hc) body .site-nav__list > .nav-item > .nav-link {
    display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px;
    padding: 0 10px 0 14px !important; border: 0 !important; border-radius: 14px; background: transparent !important;
    color: #f3f1e6 !important; font: 500 17px/1.3 'Roboto', 'Segoe UI', sans-serif !important; text-align: left;
    box-shadow: none !important; position: relative; overflow: visible;
  }
  html:not(.hc) body .site-nav__list > .nav-item > .nav-link::after { display: none !important; }
  html:not(.hc) body .site-nav__list > .nav-item > .nav-link:active { background: rgba(255, 255, 255, .05) !important; }
  html:not(.hc) body .site-nav__list > .nav-item.is-active > .nav-link,
  html:not(.hc) body .site-nav__list > .nav-item > .nav-link[aria-current] { background: rgba(245, 197, 24, .1) !important; color: #f3f1e6 !important; }
  html:not(.hc) body .site-nav__list > .nav-item.is-active > .nav-link::before,
  html:not(.hc) body .site-nav__list > .nav-item > .nav-link[aria-current]::before {
    content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: #f5c518;
  }

  /* round chevron */
  html:not(.hc) body .site-nav__list .nav-caret {
    width: 36px !important; height: 36px !important; flex: none; border: 0 !important; border-radius: 50%;
    display: grid !important; place-items: center; background: rgba(255, 255, 255, .05); color: #f5c518 !important;
    transition: transform .25s; margin-left: 10px;
  }
  html:not(.hc) body .site-nav__list .nav-caret svg { width: 12px; height: 12px; }
  html:not(.hc) body .site-nav__list .nav-item.is-open > .nav-link > .nav-caret { transform: rotate(180deg); }

  /* sub-menu: slides open, indented with a thin line */
  html:not(.hc) body .site-nav__list .nav-sub {
    display: block !important; max-height: 0; overflow: hidden; transition: max-height .3s ease;
    background: transparent !important; padding: 0; margin: 0;
  }
  html:not(.hc) body .site-nav__list .nav-item.is-open > .nav-sub { padding: 2px 0 8px; }
  html:not(.hc) body .site-nav__list .nav-sub .nav-item { border: 0 !important; }
  html:not(.hc) body .site-nav__list .nav-sub .nav-link {
    display: block; min-height: 0; margin-left: 14px; padding: 12px 14px 12px 30px !important; border: 0 !important;
    border-left: 1px solid rgba(255, 255, 255, .08) !important; border-radius: 0; background: transparent !important;
    color: #a9b3a6 !important; font: 400 15.5px/1.35 'Roboto', 'Segoe UI', sans-serif !important; box-shadow: none !important;
  }
  html:not(.hc) body .site-nav__list .nav-sub .nav-link:active,
  html:not(.hc) body .site-nav__list .nav-sub .nav-link[aria-current] { color: #f5c518 !important; }

  /* bottom: Donate + note */
  html:not(.hc) body .site-nav__foot {
    display: block; flex: none; padding: 16px 24px calc(20px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, .08);
  }
  html:not(.hc) body .site-nav__donate {
    display: block; text-align: center; padding: 16px; border-radius: 14px; background: linear-gradient(135deg, #f5c518, #d9a800);
    color: #1a1a00 !important; font: 700 17px/1.2 'Roboto', 'Segoe UI', sans-serif; text-decoration: none;
  }
  html:not(.hc) body .site-nav__note { margin: 12px 0 0; text-align: center; font-size: 13px; color: #a9b3a6; }
}
@media (max-width: 1199px) and (prefers-reduced-motion: reduce) {
  html:not(.hc) body :is(.site-nav__panel, .site-nav__overlay, .site-nav__list .nav-sub, .site-nav__list .nav-caret) { transition: none; }
}
