@media (max-width: 54rem) { /* --bp-phone */
  .header-nav-wrapper {
    display: none !important;
  }

  header .container {
    flex-direction: column;
    text-align: center;
  }

  nav ul {
    flex-direction: column;
    gap: 0.9375rem;
  }

  .hero {
    padding: 9.375rem 1.25rem;
  }

  /* Phone header: hamburger + wordmark on the left, search on the right, in
     the same single 4rem row the desktop uses. Both children are centred on
     the cross axis so the icon and the text sit on one optical line.

     Gutter alignment. The icon buttons are 2.75rem squares with the glyph
     centred, so the ink sits ~10.6px inside the button's left edge. Left
     uncorrected the hamburger's ink lands at x=26.6 while the page's h1 sits
     at x=16, and the header reads as indented against the content.

     -1.25rem (20px) cancels that inset: the 1.25rem icon centred in a 2.75rem
     button sits 12px in, plus the row's own 1rem gutter is already paid by
     .header-top. Measured in a browser at 390px and 320px, not estimated; if
     the button or icon size changes, re-measure rather than nudge. */
  .header-left {
    align-items: center;
    gap: var(--space-xxs);
    min-width: 0;
    flex: 1;
    margin-left: -1.25rem;
  }

  /* min-width:0 lets a long name truncate instead of shoving the search icon
     off-screen; the flex item won't shrink below its content without it. */
  .header-title {
    min-width: 0;
    overflow: hidden;
  }

  .site-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1;
  }

  /* The negative right margin mirrors .header-left's, so the search glyph lines
     up with the page gutter rather than its padding box. */
  .header-right {
    align-items: center;
    justify-content: flex-end;
    flex: none;
    /* Mirrors .header-left. The search glyph is wider than the hamburger's, so
       its inset is smaller and the correction is correspondingly less. */
    margin-right: -0.72rem;
  }

  /* When the full-screen menu is open, hide the header's right-side
     controls (search icon + any links). The stylesheet, not
     mobile_menu.js, owns the "menu open" state. The desktop nav is already
     hidden at this breakpoint via .header-nav-wrapper above. */
  body.menu-open .header-right {
    display: none;
  }

  /* Size only; box model and centring live with the component in header.css. */
  .search-icon {
    font-size: 1.3rem;
  }

  /* Hide the header's text links on a phone — sign-in/subscribe and the
     account dropdown all live in the hamburger overlay instead. Scoped to
     DIRECT children: the editorial nav now sits inside .header-right too, and
     an unscoped `.header-right a` also matched every nav link (and, with
     !important, could not be overridden by .header-nav-wrapper's own rule). */
  .header-right > a,
  .header-right > .link-hover-underline,
  .header-right > .account-dropdown {
    display: none;
  }

  .header-right .search-wrapper:not(.open) .search-dropdown,
  .header-right .search-wrapper:not(.open) input,
  .header-right .search-wrapper:not(.open) ul {
    display: none;
  }

  /* .site-title's phone size lives in header.css with the rest of the wordmark
     — it was duplicated here at a different value, and since mobile.css loads
     last that copy silently won. One source of truth. */

  /* The hamburger is an SVG sized in header.css; nothing to override here. */

  /* Full-screen overlay menu. Kept in the layout (display:flex) but hidden
     via opacity/visibility so the open/close can transition — `display`
     can't animate. visibility:hidden also removes it from the tab order and
     AT tree while closed. The transition is neutralized site-wide under
     prefers-reduced-motion (global_styles.css).

     NB: deliberately a fade only, no `transform`. A transform on this element
     would make it the containing block for its position:fixed children (the
     close button), re-anchoring them to the overflowing menu box instead of
     the viewport and pushing the X off-screen. Keep this transform-free. */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--header-bg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 4rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast),
      visibility 0s linear var(--transition-fast);
  }

  .mobile-menu.open {
    opacity: 1;
    visibility: visible;
    transition: opacity var(--transition-fast),
      visibility 0s;
  }

  /* Anchored to the viewport (position: fixed), not the menu. The overlay is
     a scroll container (overflow-y: auto); an absolutely-positioned child in
     it can stretch its scroll width and end up placed off-screen. The close
     button lives inside the full-screen fixed overlay, so fixing it to the
     viewport's top-right pins it correctly regardless of the menu's content
     width. */
  .mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2.2rem;
    position: fixed;
    top: 1.2rem;
    right: 1.5rem;
    cursor: pointer;
    z-index: 2100;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    opacity: 0.9;
    transition: opacity 0.2s;
  }

  .mobile-menu-close:hover,
  .mobile-menu-close:focus {
    opacity: 1;
  }

  /* `flex`, not `block`: the button centres its glyph (see header.css). Kept
     !important because it has to win over the desktop `display: none` and over
     any inline state the menu script may set. */
  .hamburger {
    display: flex !important;
    position: relative;
    z-index: 2100;
  }
}
