/* phone-menus v1 (31 Oct 2026): the phone menus of the home redesign, live on their own (see phone-menus.js) */
/* ---------------- phone menus (<=560px) ---------------- */
#nav-screen,#hv2-more,.hv2-plansbtn{display:none}
@media (max-width:560px),(min-width:561px) and (max-width:1366px) and (hover:none) and (pointer:coarse){
  html.hv2-on body > header nav #nav-plans,
  html.hv2-on body > header nav #nav-profile,html.hv2-on body > header nav #nav-batches{display:none!important}
  html.hv2-on body > header nav #nav-screen{display:flex}
  html.hv2-on body > header nav #nav-home{order:1}html.hv2-on body > header nav #nav-shorts{order:2}html.hv2-on body > header nav #nav-screen{order:3}
  html.hv2-on body > header nav #nav-drill{order:4}html.hv2-on body > header nav #nav-today{display:flex!important;order:5}html.hv2-on body > header nav #nav-apps{order:6}html.hv2-on body > header nav #nav-blog{display:flex!important;order:7}   /* menus v3 (the Boss: "Blog should also be on the bottom menu"): 7 tabs */
  html.hv2-on body > header nav button{flex:1 1 0;min-width:0}html.hv2-on body > header nav button span{white-space:nowrap;overflow:hidden;text-overflow:clip}
  html.hv2-on body > header nav{display:flex}
  html.hv2-on body #helpbtn,html.hv2-on body #themebtn,html.hv2-on body.rl-in .authbar button.who,html.hv2-on body .authbar .quotapill{display:none!important}   /* Profile, Help and Dark mode live in More */
  html.hv2-on #hv2-more,html.hv2-on .authbar .hv2-plansbtn{display:inline-flex}
  html.hv2-on body > header nav{gap:0!important;padding-left:2px!important;padding-right:2px!important}
  html.hv2-on body > header nav button{padding-left:1px!important;padding-right:1px!important;min-height:44px}
  html.hv2-on body > header nav button span{font-size:.75rem}
  @media (max-width:340px){html.hv2-on body > header nav button span{letter-spacing:-.02em}}   /* never below the .75rem floor */
  .hv2-topbtn{position:relative;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;border-radius:50%;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.08);color:#fff;cursor:pointer;padding:0}
  .hv2-topbtn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .hv2-topbtn .navbadge:not([hidden]){display:block;position:absolute;top:-5px;right:-5px;min-width:15px;height:15px;padding:0 4px;border-radius:999px;background:#C62828;color:#fff;font:800 10px/15px Manrope,system-ui,sans-serif;text-align:center}
}
#hv2-sheet{position:fixed;top:calc(56px + env(safe-area-inset-top));right:10px;z-index:9999;min-width:200px;background:var(--card);border:1px solid var(--line);border-radius:14px;box-shadow:0 12px 32px rgba(0,0,0,.25);padding:6px;display:flex;flex-direction:column}
#hv2-sheet button{font:700 .95rem Manrope,system-ui,sans-serif;text-align:left;background:none;border:0;color:var(--ink);padding:12px 14px;border-radius:10px;min-height:44px;cursor:pointer}
#hv2-sheet button:hover{background:var(--line)}
/* menus v4.1 (the Boss via Johnny, 31 Oct: keep "Recallab" and "PG", just smaller; keep all six controls). Logo = the full-res lockup
   scaled (the tagline row cropped off: rows 0-113 of 153); circles 36 px with an invisible 4 px hit extension = 44 px tap areas */
.hv2-themebtn{display:none}
@media (max-width:560px),(min-width:561px) and (max-width:1366px) and (hover:none) and (pointer:coarse){
  html.hv2-on body > header{gap:4px!important;padding-left:6px!important;padding-right:6px!important}
  html.hv2-on body > header .logo{flex:0 0 auto}
  html.hv2-on .authbar .adminbtn:not(.topbatch),html.hv2-on .authbar .admmore{display:none!important}   /* batches-top v1 (the Boss, 31 Oct): Batches is back in the top bar */   /* menus v5.2: Admin is in More; the admin '...' menu repeats More */
  #hv2-more.hv2-dot::before{content:"";position:absolute;top:1px;right:1px;width:10px;height:10px;border-radius:50%;background:#e5484d;border:2px solid #0f2622}
  html.hv2-on .authbar{display:flex!important;align-items:center;gap:6px!important;margin-left:auto!important}
  html.hv2-on #msgbtn{margin-left:auto!important}
  html.hv2-on #msgbtn + .authbar{margin-left:6px!important}
  html.hv2-on #hv2-more{margin-left:6px}
  html.hv2-on .authbar .hv2-plansbtn{order:1}html.hv2-on .authbar .topbatch{order:2}html.hv2-on .authbar .totchip{order:3}
  html.hv2-on .authbar .hv2-themebtn{order:4}html.hv2-on .authbar > button:not(.totchip):not(.hv2-topbtn):not(.topbatch):not(.who){order:5}
  .hv2-topbtn,html.hv2-on #msgbtn,html.hv2-on .authbar .topbatch{width:36px!important;height:36px!important;min-width:36px!important;position:relative;border-radius:50%!important;padding:0!important}
  .hv2-topbtn::after,html.hv2-on #msgbtn::after{content:"";position:absolute;inset:-4px}   /* 44 px tap area around the 36 px circle */
}
@media (max-width:340px){
  html.hv2-on body > header{padding-left:3px!important;padding-right:3px!important}
  html.hv2-on .authbar{gap:4px!important}html.hv2-on #msgbtn + .authbar,html.hv2-on #hv2-more{margin-left:4px!important}
  .hv2-topbtn,html.hv2-on #msgbtn,html.hv2-on .authbar .topbatch{width:34px!important;height:34px!important;min-width:34px!important}
  .hv2-topbtn::after,html.hv2-on #msgbtn::after{inset:-5px}   /* still a 44 px tap area */
}
@media (max-width:560px),(min-width:561px) and (max-width:1366px) and (hover:none) and (pointer:coarse){html.hv2-on body:not(.rl-in) #msgbtn{display:none!important}}   /* menus v4.1: Messages is signed-in only */
/* desktop-menus v1 (the Boss via Johnny, 31 Oct: the desktop top menu "is not in the right order"): the phone's order on desktop too,
   Home · Scroll · Screen · Drill · Today · Apps · Plans · Blog · Profile; Screen and Today shown (Today keeps its red due badge);
   Profile folds into the account menu below 1200 px so the bar never wraps */
@media (min-width:561px) and (hover:hover),(min-width:1367px){
  html.hv2-on body > header nav #nav-home{order:1}
  html.hv2-on body > header nav #nav-shorts{order:2}
  html.hv2-on body > header nav #nav-screen{display:inline-flex;align-items:center;order:3}
  html.hv2-on body > header nav #nav-drill{order:4}
  html.hv2-on body > header nav #nav-today{display:inline-flex!important;align-items:center;gap:.3rem;order:5}
  html.hv2-on body > header nav #nav-apps{order:6}
  html.hv2-on body > header nav #nav-plans{order:7}
  html.hv2-on body > header nav #nav-blog{order:8}
  html.hv2-on body > header nav #nav-profile{order:9}
  html.hv2-on body > header nav #nav-today .navbadge:not([hidden]){position:static;display:inline-block;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#C62828;color:#fff;font:800 10px/16px Manrope,system-ui,sans-serif;text-align:center}
}
@media (min-width:561px) and (max-width:1439px) and (hover:hover),(min-width:1367px) and (max-width:1439px){   /* Profile folds into the account button; tighter tabs; a long email is cut with an ellipsis */
  html.hv2-on body > header nav #nav-profile{display:none!important}
  html.hv2-on body > header nav button{padding-left:10px!important;padding-right:10px!important}
  html.hv2-on body > header #authbar .who{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
@media (min-width:561px) and (max-width:1150px) and (hover:hover){   /* small laptops: the plan pill steps aside (it is on the Profile page) */
  html.hv2-on body > header #authbar .quotapill{display:none!important}
  html.hv2-on body > header nav{gap:.15rem!important}
  html.hv2-on body > header nav button{padding-left:8px!important;padding-right:8px!important}
}

/* badge-one v1 (the Boss via Johnny, 31 Oct: "Today shows 20 and Batches 18, but one is raised and the other level"): every count is the
   same raised red pill at the top-right of its icon or tab (Today, Batches, Messages); the More dot is the same red */
html.hv2-on body > header .topbatch .navbadge:not([hidden]),html.hv2-on body > header #msgbtn .msgdot,
html.hv2-on body > header nav #nav-today .navbadge:not([hidden]){position:absolute!important;top:-5px!important;right:-5px!important;left:auto!important;bottom:auto!important;
  min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#C62828!important;color:#fff!important;
  font:800 10px/16px Manrope,system-ui,sans-serif!important;text-align:center;box-shadow:0 0 0 1.5px #16352F;transform:none!important;margin:0!important}
html.hv2-on body > header nav #nav-today,html.hv2-on body > header .topbatch,html.hv2-on body > header #msgbtn{position:relative}
html.hv2-on body > header .topbatch .navbadge:not([hidden]),html.hv2-on body > header nav #nav-today .navbadge:not([hidden]){display:block!important}   /* the Messages count keeps its own show/hide */
#hv2-more.hv2-dot::before{background:#C62828}
/* top-order v1 (the Boss, 31 Oct: "the tick with the number of questions answered to come first, followed by the messages, and followed by
   the batches"): on phones the account bar's items join the header's own row so they can interleave with Messages: logo · ✓ · Messages ·
   Batches · (Sign in) · More */
@media (max-width:560px),(min-width:561px) and (max-width:1366px) and (hover:none) and (pointer:coarse){
  html.hv2-on body > header > .authbar{display:contents!important}
  html.hv2-on body > header .authbar > .totchip{order:11!important;margin-left:auto!important}
  html.hv2-on body > header > #msgbtn{order:12!important;margin-left:6px!important}
  html.hv2-on body > header .authbar > .topbatch{order:13!important;margin-left:6px!important}
  html.hv2-on body > header .authbar > button:not(.totchip):not(.topbatch):not(.hv2-topbtn){order:14!important;margin-left:6px!important}
  html.hv2-on body > header > #hv2-more{order:15!important;margin-left:6px!important}
  html.hv2-on body > header > .logo{order:0!important}
}
/* badge-today v1 (the Boss, 1 Nov 2026: "The 20 badge is not aligned with today"): in the phone bottom bar, Today's count sits on the
   clock icon's top-right corner, not the tab's far corner */
@media (max-width:560px),(min-width:561px) and (max-width:1366px) and (hover:none) and (pointer:coarse){
  html.hv2-on body > header nav #nav-today .navbadge:not([hidden]){left:calc(50% + 3px)!important;right:auto!important;top:3px!important}
}
