/* The ☰ menu (js/menu.js) on the PureFlight home and the portal: three lines at the top right at every screen size. On a
   phone it opens as a panel under the header; on a computer as a drawer on the right. Light surfaces in the site's
   tokens (css/site.css), dark mode with them.

   Touch (the owner, Nov 9): every row and button is at least 48 px tall (Android's 48 dp; the products' rows 56), a
   hover look only where there is a real hover (@media (hover:hover): a tapped control on a phone keeps no outline), and
   a brief pressed shade (:active) while a finger is down, since the app turns the tap highlight off (css/app.css). The
   panel ends above the phone's own bars: Android's navigation bar in the app (--psn-bottom, css/app.css) and iOS's home
   indicator (env(safe-area-inset-bottom)). */

:root{--psm-press:color-mix(in srgb,var(--ink) 11%,transparent);--psm-safe-b:var(--psn-bottom,env(safe-area-inset-bottom,0px))}

.ic{width:22px;height:22px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* the button: three lines and "Menu" (the word goes under 360 px; the name stays) */
.psm-btn{display:inline-flex;align-items:center;gap:9px;min-height:44px;padding:0 16px 0 14px;border-radius:999px;border:1px solid var(--psm-btn-line,var(--line));
  background:var(--psm-btn-bg,var(--surface));color:var(--psm-btn-ink,var(--ink));font-weight:500;font-size:15px;cursor:pointer;flex:0 0 auto;-webkit-tap-highlight-color:transparent}
@media (hover:hover){.psm-btn:hover{border-color:var(--psm-btn-hover,var(--ink-2))}}
.psm-btn:active{background:var(--psm-press)}
.psm-btn[aria-expanded="true"]{border-color:var(--psm-btn-hover,var(--ink-2))}
/* (whole pixels: 2 px lines, 2 px apart, the middle one exactly halfway and sharp at 1x, 2x and 3x; the header's ☰ is
   18 x 12, css/header.css) */
.bars{display:inline-block;width:16px;height:10px;border-block:2px solid currentColor;position:relative}
.bars::after{content:"";position:absolute;left:0;right:0;top:2px;border-top:2px solid currentColor}
@media (max-width:359.98px){.psm-btn{width:44px;padding:0;justify-content:center}.psm-btn-word{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}}
/* on the black header (the portal) */
.on-dark .psm-btn,.psm-btn.on-dark{--psm-btn-line:rgba(255,255,255,.28);--psm-btn-bg:transparent;--psm-btn-ink:var(--head-ink);--psm-btn-hover:rgba(255,255,255,.6)}

/* the panel */
.psm{position:fixed;z-index:60;top:var(--psm-top,68px);left:12px;right:12px;max-height:calc(100vh - var(--psm-top,68px) - 12px - var(--psm-safe-b));max-height:calc(100dvh - var(--psm-top,68px) - 12px - var(--psm-safe-b));overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;
  padding:6px 6px 8px;background:var(--surface);color:var(--ink);border:1px solid var(--line-2);border-radius:20px;box-shadow:0 18px 48px rgba(0,0,0,.2),0 2px 6px rgba(0,0,0,.06)}
@media (min-width:760px){
  .psm{top:0;right:0;left:auto;bottom:0;width:380px;max-height:none;border-radius:0;border-width:0 0 0 1px;padding:calc(10px + var(--psn-top,0px)) 12px calc(24px + var(--psm-safe-b));box-shadow:-18px 0 48px rgba(0,0,0,.14)}
}
.psm-scrim{position:fixed;inset:0;z-index:55;background:rgba(0,0,0,.32)}
.psm :focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.psm-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 4px 4px 12px}
.psm-title{font-size:13px;font-weight:600;color:var(--muted)}
.psm-close{display:grid;place-items:center;width:48px;height:48px;border:0;border-radius:12px;background:none;color:var(--ink-2);cursor:pointer;-webkit-tap-highlight-color:transparent}
.psm-group{padding:4px 0 6px}
.psm-group + .psm-group{border-top:1px solid var(--line-2)}
.psm-h{margin:10px 12px 4px;font-size:12.5px;font-weight:600;color:var(--muted)}
.psm ul{list-style:none;margin:0;padding:0}
.psm-li{display:flex;align-items:center;gap:2px}
.psm-row{flex:1 1 auto;display:flex;align-items:center;gap:12px;min-width:0;min-height:48px;padding:6px 12px;border-radius:10px;color:var(--ink);text-decoration:none;font-size:15.5px;font-weight:500;-webkit-tap-highlight-color:transparent}
.psm-row .ic{width:20px;height:20px;color:var(--muted)}
/* the current row: the soft blue, and a short gold bar at its left edge (one of the brand's few gold accents) */
.psm-row[aria-current="page"]{position:relative;background:var(--accent-soft);color:var(--accent);font-weight:600}
.psm-row[aria-current="page"]::before{content:"";position:absolute;left:3px;top:12px;bottom:12px;width:3px;border-radius:2px;background:var(--gold)}
.psm-row[aria-current="page"] .ic{color:var(--accent)}
.psm-t{min-width:0;overflow-wrap:anywhere}
.psm-badge{margin-left:auto;flex:0 0 auto;font-size:13px;font-weight:600;color:var(--ink-2)}
.psm-badge.is-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:var(--accent-fill);color:var(--on-accent);font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1}
.psm-badge.is-live{display:inline-flex;align-items:center;gap:7px;color:var(--good-ink)}
.psm-badge.is-live::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor;box-shadow:0 0 0 3px color-mix(in srgb,currentColor 18%,transparent)}
/* Appearance (js/theme.js's control): Auto, Light or Dark; not a group of places, drawn like one */
.psm-theme{padding:4px 0 8px;border-top:1px solid var(--line-2)}
.psm-theme-h{margin:10px 12px 4px;font-size:12.5px;font-weight:600;color:var(--muted)}
.psm-theme .seg{margin:2px 12px 4px}
.psm-theme .seg.pf-theme-seg.is-compact{min-height:48px}
.psm-acct{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 10px;margin-top:6px;padding:12px 12px 4px;border-top:1px solid var(--line-2);font-size:13.5px;color:var(--muted)}
.psm-email{min-width:0;overflow-wrap:anywhere}
.psm-acct .btn{min-height:48px;flex:0 0 auto;-webkit-tap-highlight-color:transparent}
@media (prefers-reduced-motion:no-preference){
  .psm-row,.psm-btn{transition:background-color .15s,border-color .15s,color .15s}
}
/* opening (the owner, Nov 16: "the app transitions seem jumpy or kind of harsh"): the panel drops in and the backdrop
   fades in, 180 ms ease-out (the drawer slides in from the right on a computer); a quick fade with reduced motion */
@media (prefers-reduced-motion:no-preference){
  .psm:not([hidden]){animation:psm-open .18s ease-out}
  .psm-scrim:not([hidden]){animation:psm-fade .18s ease-out}
}
@media (prefers-reduced-motion:no-preference) and (min-width:760px){.psm:not([hidden]){animation-name:psm-drawer}}
@media (prefers-reduced-motion:reduce){.psm:not([hidden]),.psm-scrim:not([hidden]){animation:psm-fade .12s ease-out}}
@keyframes psm-open{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
@keyframes psm-drawer{from{opacity:.6;transform:translateX(24px)}to{opacity:1;transform:none}}
@keyframes psm-fade{from{opacity:0}to{opacity:1}}

/* the portal's header on a phone: Home, Your account, Sign out and the ☰ menu as three lines alone (its name stays
   "Menu"); the email is in the menu there (js/portal-menu.js adds .has-psm to <html> once it's mounted, so without the
   menu the email stays) */
.p-account .psm-btn{min-height:40px}
@media (max-width:640px){
  .has-psm .p-account{justify-content:flex-end}
  .has-psm .p-account .p-email{display:none}
  .p-account .psm-btn{width:40px;padding:0;justify-content:center}
  .p-account .psm-btn-word{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
}

/* ---------- the products' marks in the menu (js/places.js: the owner's artwork; css/site.css .pf-art, .lk) ----------
   A product's own row (BuildLab, PureFlightSocial) is its mark's name line alone, about the height of the row's words; a
   heading or a label that names a product has the name line among its words. */
.pf-lockup{display:inline-flex;align-items:center;white-space:nowrap;line-height:1;vertical-align:middle}
.psm-mk{display:flex;align-items:center}
.psm-mk .pf-art{height:21px;max-width:100%}
.psm-h .pf-art{height:15px}


/* the products (js/menu.js; the owner, Nov 5): each one row, its mark and a chevron, opening its own list in the panel */
.psm-drill{width:100%;border:0;background:none;font:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}
.psm-drill .psm-badge{margin-left:auto}
.psm-go{flex:0 0 auto;width:18px;height:18px;margin-left:auto;color:var(--muted)}
.psm-drill .psm-badge:not([hidden]) + .psm-go{margin-left:8px}
.psm-drill.is-here{position:relative;background:var(--accent-soft)}
.psm-drill.is-here::before{content:"";position:absolute;left:3px;top:12px;bottom:12px;width:3px;border-radius:2px;background:var(--gold)}
.psm-prods .psm-row{min-height:56px}
.psm-prods .psm-mk .pf-art{height:23px}
.psm-sub{padding:0 0 8px}
.psm-back{display:inline-flex;align-items:center;gap:4px;min-height:48px;margin:0 0 2px 4px;padding:0 14px 0 8px;border:0;border-radius:12px;background:none;color:var(--accent);font:inherit;font-size:15px;font-weight:600;cursor:pointer;-webkit-tap-highlight-color:transparent}
.psm-back svg{width:18px;height:18px}
.psm-sub-h{margin:6px 12px 10px;line-height:0}
.psm-sub-mk .pf-art{height:44px;max-width:100%}
.psm-sub ul{border-top:1px solid var(--line-2);padding-top:6px}
@media (prefers-reduced-motion:no-preference){
  .psm-sub:not([hidden]){animation:psm-in .18s ease-out}
  .psm-main.is-back{animation:psm-back .18s ease-out}
}
@keyframes psm-in{from{opacity:0;transform:translateX(18px)}to{opacity:1;transform:none}}
@keyframes psm-back{from{opacity:0;transform:translateX(-18px)}to{opacity:1;transform:none}}
/* In a product's list "‹ Menu" says it once, on the Close button's line (the owner, Nov 9: no empty line above it):
   the head, Close alone, sits over the list's top right; "‹ Menu" starts the list on the same 48 px line */
.psm.in-sub .psm-title{display:none}
.psm.in-sub .psm-head{position:absolute;top:6px;right:6px;padding:4px;z-index:1}
.psm-sub{padding-top:4px}
@media (min-width:760px){.psm.in-sub .psm-head{top:calc(10px + var(--psn-top,0px));right:12px}}

/* Hover (a mouse or a trackpad only) and pressed (a finger down, or a click) */
@media (hover:hover){
  .psm-close:hover,.psm-back:hover,.psm-row:not([aria-current="page"]):not(.is-here):hover{background:var(--bg-2)}
}
/* a touch screen: the site's .btn hover (css/site.css) left alone would keep Sign out's and App settings' outline */
@media not all and (hover:hover){
  .psm-acct .btn:hover{border-color:var(--line)}
}
.psm-close:active,.psm-back:active,.psm-row:active,.psm-acct .btn:active{background:var(--psm-press);transition:none}
.psm-row[aria-current="page"]:active,.psm-drill.is-here:active{background:color-mix(in srgb,var(--accent) 20%,var(--accent-soft))}

/* A round in play (js/roundresume.js, PSMenu.roundBack): the way back, first in the menu and big. */
.psm-round{display:flex;align-items:center;gap:12px;margin:4px 4px 10px;min-height:60px;padding:10px 14px;border-radius:14px;background:var(--accent-fill);color:var(--on-accent);text-decoration:none;-webkit-tap-highlight-color:transparent}
.psm-round:hover,.psm-round:active{background:var(--accent-press)}
.psm-round:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.psm-round-dot{flex:0 0 auto;width:10px;height:10px;border-radius:50%;background:var(--good);box-shadow:0 0 0 3px color-mix(in srgb,var(--good) 30%,transparent)}
.psm-round-w{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}
.psm-round-w b{font-size:16px;font-weight:700}
.psm-round-w span{font-size:13px;opacity:.88;overflow-wrap:anywhere}
.psm-round .ic{flex:0 0 auto;width:20px;height:20px}
