/* ===== Phone header: one slim row + dropdown menu + sticky sign bar =====
   Shared by every page. Loaded after each page's own styles so it wins.
   Only applies when site-header.js has run (html.hm); without JavaScript
   the page keeps its original two-row header, so the links stay reachable. */

.menu-btn, .mbar { display: none; }
.hdr-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

@media (max-width: 760px) {
  .hm .site-header .wrap {
    position: relative; flex-wrap: nowrap; height: 64px;
    padding-top: 0; padding-bottom: 0; gap: 10px;
  }
  .hm .header-logo, .hm .header-logo svg { height: 46px; }

  /* "Sign" pill with a soft pulsing glow */
  .hm .hdr-actions .btn { border-radius: 999px; padding: 10px 18px; font-size: 14px; box-shadow: none; transform: none; animation: hm-glow 2.4s ease-out infinite; }
  .hm .hdr-actions .btn-long { display: none; }
  .hm .hdr-actions .btn-short { display: inline; }
  @keyframes hm-glow {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .75); }
    70%, 100% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
  }

  /* Round menu button: three bars that turn into a cross */
  .hm .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%; padding: 0; cursor: pointer;
    background: #F7F1E6; border: 2px solid #1B1B2F; color: #1B1B2F;
  }
  .menu-ico { position: relative; width: 18px; height: 14px; display: block; }
  .menu-ico i { position: absolute; left: 0; width: 100%; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform .25s ease, opacity .2s ease, top .25s ease; }
  .menu-ico i:nth-child(1) { top: 0; }
  .menu-ico i:nth-child(2) { top: 5.75px; }
  .menu-ico i:nth-child(3) { top: 11.5px; }
  .menu-btn[aria-expanded="true"] .menu-ico i:nth-child(1) { top: 5.75px; transform: rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-ico i:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] .menu-ico i:nth-child(3) { top: 5.75px; transform: rotate(-45deg); }

  /* The nav becomes a dropdown panel under the header */
  .hm .site-nav {
    display: block; position: absolute; top: 100%; left: 0; right: 0; margin-top: 3px;
    background: #1B1B2F; border-bottom: 3px solid #E3216F;
    box-shadow: 0 18px 30px rgba(27, 27, 47, .35);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
  }
  .hm .site-nav.open { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease, visibility 0s; }
  .hm .nav-links { flex-direction: column; align-items: stretch; gap: 0; padding: 6px 22px 14px; }
  .hm .nav-links li + li { border-top: 1px solid rgba(247, 241, 230, .18); }
  .hm .nav-links a { display: block; padding: 16px 0; font-size: 22px; font-weight: 700; color: #F7F1E6; }
  .hm .nav-links a[aria-current="page"] { color: #FF6FA6; text-decoration: none; }
  .hm .nav-links a[aria-current="page"]::after { content: " ●"; font-size: 12px; vertical-align: middle; }

  /* Sticky "Sign the petition" bar along the bottom */
  .hm .mbar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #1B1B2F; border-top: 3px solid #E3216F;
    transform: translateY(110%); visibility: hidden;
    transition: transform .3s cubic-bezier(.34, 1.3, .64, 1), visibility 0s .3s;
  }
  .hm .mbar.show { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.34, 1.3, .64, 1), visibility 0s; }
  .mbar .btn { display: block; width: 100%; text-align: center; padding: 13px 16px; font-size: 17px; border-color: #F7F1E6; box-shadow: 3px 3px 0 #F7F1E6; }
  .mbar .btn:hover, .mbar .btn:active { box-shadow: 1px 1px 0 #F7F1E6; }
}

/* Small phones (320–360px): tighten so the menu button never runs off screen */
@media (max-width: 360px) {
  .hm .site-header .wrap { padding-left: 16px; padding-right: 16px; gap: 8px; }
  .hm .header-logo, .hm .header-logo svg { height: 40px; }
  .hm .hdr-actions { gap: 8px; }
  .hm .hdr-actions .btn { padding: 9px 14px; }
  .hm .nav-links { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .hm .hdr-actions .btn { animation: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .55); }
  .hm .site-nav, .hm .site-nav.open, .hm .mbar, .hm .mbar.show, .menu-ico i { transition: none; }
}
