/* Munshi — one hover / press effect for EVERY clickable thing (client, 23 Nov 2026):
   mouse over → soft theme tint + lifts a little + grows a little, so you know what you are about to pick.
   Phone (no mouse) → the same tint + a small press-in when tapped.
   Uses the `scale` / `translate` properties (not `transform`) so it never fights other animations. Loaded after type.css. */
:root{--hv-tint:rgba(var(--trgb,255,107,26),.09);--hv-line:rgba(var(--trgb,255,107,26),.38);--hv-shadow:0 6px 18px rgba(60,20,10,.12);--hv-ease:cubic-bezier(.22,1,.36,1)}

/* 1. small controls: buttons, icon buttons, tabs, chips, pills that act, menu items, bottom bar */
:where(button,.btn,.icon,[role="button"],input[type="button"],input[type="submit"],select,.tabs a,.chip,label.chip,.lang-b,.ctype,.pill[data-act],a.pill,#side nav a,#bottom a,#tback,.fb-btn,.qa a,.qa button,.tlock,.acc-n,[data-act]:not(:is(.list a.main,.navrows a,.dc,a.dc,.acc-h,.card,section,li,div.kp,div.tl,tr)))
{transition:scale .18s var(--hv-ease),translate .18s var(--hv-ease),background-color .18s ease,box-shadow .18s ease,border-color .18s ease,filter .18s ease}

/* buttons reset with all:unset need their own transition (class rules beat :where) */
.cg-i,.scan-th,.dt-h,.acc-h{transition:scale .2s var(--hv-ease),translate .2s var(--hv-ease),background-color .2s ease,box-shadow .2s ease}

/* 2. big targets: list rows, dashboard boxes, folds, pop-up (🔔) cards, day cells */
:where(.list a.main,.navrows a,.dc,a.dc,.dt-h,.dtog,details.fold>summary,.acc-i,.kp,.tl,.wk-d,.cal div[data-d],.acct,.cs-pick label,.ccard,.list li[data-act],tr[data-act],.daycol a,.ctd-item,.lead-c,.doc-c)
{transition:scale .2s var(--hv-ease),translate .2s var(--hv-ease),background-color .2s ease,box-shadow .2s ease,border-color .2s ease}

@media (hover:hover) and (pointer:fine){
  /* small controls: tint + lift 1px + grow 5% */
  :is(button,.btn,.icon,[role="button"],input[type="button"],input[type="submit"],select,.tabs a,.chip,label.chip,.lang-b,.ctype,.pill[data-act],a.pill,#tback,.fb-btn,.qa a,.qa button,.tlock):not(:disabled,.acc-h):hover{scale:1.05;translate:0 -1px;cursor:pointer}
  :is(button,.btn,.icon,[role="button"],.tabs a,.chip,label.chip,.lang-b,.ctype,a.pill,#tback,.qa a,.qa button):not(:disabled,.p,.on,.acc-h,.fb-btn):hover{background-color:var(--hv-tint);box-shadow:0 0 0 1px var(--hv-line),var(--hv-shadow)}
  :is(.btn.p,button.p,.fb-btn):not(:disabled):hover{filter:brightness(1.06);box-shadow:var(--hv-shadow)}
  /* side menu + bottom bar: grow a little, no lift (they sit in a row) */
  #side nav a:hover{scale:1.03;background-color:var(--hv-tint)}
  :root[data-dock="1"] #side nav a:hover{scale:1}
  #bottom a:hover{scale:1.08;background-color:var(--hv-tint)}
  /* any other link that does something (data-act on a plain element) */
  [data-act]:not(:is(button,a,.list a.main,.navrows a,.dc,.acc-h,.card,section,li,div.kp,div.tl,tr,label)):hover{scale:1.04;cursor:pointer}

  /* big targets: tint + lift 2px + grow 1.5% + soft outline */
  :is(.list a.main,.navrows a,.dc,a.dc,.dt-h,.kp,.tl,.wk-d,.cal div[data-d],.acct,.cs-pick label,.ccard,.list li[data-act],.daycol a,.ctd-item,.lead-c,.doc-c):hover{scale:1.015;translate:0 -2px;background-color:var(--hv-tint);box-shadow:0 0 0 1px var(--hv-line),var(--hv-shadow);cursor:pointer;position:relative;z-index:1}
  tr[data-act]:hover{background-color:var(--hv-tint);cursor:pointer}
  /* a fold whose summary is hovered: the whole fold lifts, not only the summary strip */
  details.fold:has(>summary:hover){box-shadow:0 0 0 1px var(--hv-line),var(--hv-shadow)}
  :is(details.fold>summary,.dtog):hover{background-color:var(--hv-tint);cursor:pointer}
  .dtog:hover{box-shadow:0 0 0 1px var(--hv-line),var(--hv-shadow)}
  /* folds (dashboard boxes) do NOT grow or move: they open on click, and growing then shrinking looked like a jerk (client, 23 Nov 2026) */
  /* 🔔 notifications / start-up pop-up cards: the whole card lifts, the header gets the tint */
  .acc-i:has(>.acc-h:hover){scale:1.015;translate:0 -2px;box-shadow:0 0 0 1px var(--hv-line),0 10px 26px rgba(60,20,10,.14)}
  .acc-h{transition:background-color .2s ease}
  .acc-h:hover{background-color:var(--hv-tint)}
  .acc-in .list li:hover{background-color:var(--hv-tint);border-radius:10px}
  /* buttons styled with all:unset (pictures in Greetings, scanner pages): grow + lift */
  :is(.cg-i,.scan-th):hover{scale:1.04;translate:0 -2px}
  :is(.cg-i,.scan-th):hover :is(img,.cg-ph,canvas){box-shadow:0 0 0 2px var(--hv-line),var(--hv-shadow)}
  /* plain text links inside sentences: colour + underline only (inline text cannot grow) */
  :is(p,.small,small,.empty,.hint,td,.acc-in,.hello-d,.row) a:not(.btn,.main,.pill,[data-act]):hover{text-decoration:underline;text-underline-offset:3px;color:var(--brand)}
}

/* phones / tablets (no mouse): tint + small press-in while the finger is on it */
@media (hover:none){
  :is(.cg-i,.scan-th,button,.btn,.icon,[role="button"],.tabs a,.chip,label.chip,.lang-b,.ctype,a.pill,#tback,.qa a,.qa button,#bottom a,#side nav a,.fb-btn):not(:disabled):active{scale:.95;background-color:var(--hv-tint)}
  :is(.list a.main,.navrows a,.dc,a.dc,.dt-h,.acc-h,.kp,.tl,.wk-d,.cal div[data-d],.acct,.ccard,.list li[data-act],.daycol a,.ctd-item,.lead-c,.doc-c):active{scale:.985;background-color:var(--hv-tint)}
  .acc-i:has(>.acc-h:active){scale:.985}
}

/* keyboard users: clear ring on the focused control */
:is(button,a,summary,select,[role="button"],[data-act],.acc-h):focus-visible{outline:2px solid rgba(var(--trgb,255,107,26),.75);outline-offset:2px}

/* people who switched off motion in their phone/computer: keep the tint, drop the movement */
@media (prefers-reduced-motion:reduce){
  *{scale:none!important;translate:none!important}
}
