/* 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):hover{cursor:pointer}
  /* only a real button standing on its own lifts 1px (website feel); rows, date toggles and anything inside a drop-down NEVER grow or move —
     content sliding under the mouse made them grow/shrink again and again = the "vibration" (client, 24 Nov 2026) */
  .btn:not(:disabled):not(:is(.dt-b,.acc-in,.fb,.dlist,.list,#modal .box) .btn):hover{translate:0 -1px}
  :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)}
  :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{background-color:var(--hv-tint)}
  :root[data-dock="1"] #side nav a:hover{scale:1}
  #bottom a:hover{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{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,.list li[data-act],.daycol a,.ctd-item,.lead-c,.doc-c):hover{background-color:var(--hv-tint);cursor:pointer}
  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){}
  :is(details.fold>summary,.dtog):hover{background-color:var(--hv-tint);cursor:pointer}
  
  /* 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){}
  .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 :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{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,.list li[data-act],.daycol a,.ctd-item,.lead-c,.doc-c):active{background-color:var(--hv-tint)}
  
}

/* 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}
}

/* Rounded hover everywhere (client, 24 Nov 2026): the hover tint / ring never shows square corners.
   Elements that are already round (pills, cards, circles) keep their own shape — only plain rectangles get a soft 12px. */
:where(.list a.main,.list li[data-act],.navrows a,details.fold>summary,.dtog,.dt-h,.cal div[data-d],.wk-d,#side nav a,#bottom a,.tabs a,.tabs button,.acc-h,.acc-in .list li,.daycol a,.ctd-item,.lead-c,.doc-c,.kp,.tl,.dc,a.dc,.acct,.cs-pick label,.ccard,.fold .fb .list>li,label.chk,.row>a:not(.btn),.menu a,.sheet button,.sheet a){border-radius:12px}
details.fold>summary{border-radius:inherit}
details.fold[open]:not(.flt)>summary{border-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}
/* table rows: round the first and last cell so the row tint has soft ends */
tr[data-act]>td:first-child,tbody tr:hover>td:first-child{border-top-left-radius:10px;border-bottom-left-radius:10px}
tr[data-act]>td:last-child,tbody tr:hover>td:last-child{border-top-right-radius:10px;border-bottom-right-radius:10px}
/* focus rings follow the same soft corners */
:is(button,a,summary,select,[role="button"],[data-act],.acc-h):focus-visible{border-radius:12px}
:is(.btn,.pill,.chip,.icon):focus-visible{border-radius:999px}

/* ===== calm and on-brand everywhere (client, 24 Nov 2026): same quiet motion and the same orange as the website ===== */
@media (hover:hover){.card:hover,#widgets>.card:hover{transform:none!important;box-shadow:var(--shadow)!important}}
.fx-ripple{display:none!important}
/* pop-ups: warm veil (no grey-brown wash) and a soft rise */
#modal.on{background:rgba(74,50,34,.26)!important;-webkit-backdrop-filter:blur(5px)!important;backdrop-filter:blur(5px)!important}
#modal.on .box{animation:appPop .32s cubic-bezier(.22,1,.36,1)!important;box-shadow:0 24px 60px rgba(60,40,30,.22)!important}
@keyframes appPop{from{opacity:0;transform:translateY(12px) scale(.98)}}
@media (max-width:820px){#modal.on .box{animation:appSheet .36s cubic-bezier(.22,1,.36,1)!important}@keyframes appSheet{from{opacity:0;transform:translateY(40px)}}}
/* sections open in place: the chevron turns smoothly, nothing floats or jumps */
details.fold>summary::after{transition:transform .35s cubic-bezier(.22,1,.36,1)}
details.fold>.fb{overflow:visible}
/* only one accent colour: no stray blue / purple chips */
.hchips .vcb{background:var(--brand);border-color:var(--brand);color:#fff}
.st-court::before,.st-msg::before{border-color:var(--brand)}
/* the "new version ready" pill (replaces the automatic reload) */
#updPill{position:fixed;left:50%;bottom:calc(86px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:60;border:0;border-radius:99px;padding:10px 18px;background:var(--brand);color:#fff;font:700 .85rem system-ui,sans-serif;box-shadow:0 10px 26px rgba(var(--trgb,240,122,26),.4);cursor:pointer;animation:appPop .35s cubic-bezier(.22,1,.36,1)}
@media (min-width:821px){#updPill{bottom:24px}}

/* ===== MANDATORY RULE (client, 24 Nov 2026): every BUTTON — incl. every ✕ close button — gets a little lighter and pops up a little
   (grows slightly) when the mouse comes on it. Rows, list items and drop-down headers keep only the soft tint (they never grow). ===== */
@media (hover:hover) and (pointer:fine){
  :is(button,.btn,a.btn,.icon,[role="button"],input[type="button"],input[type="submit"],.chip,label.chip,a.pill,.pill[data-act],.tbtn,.qa a,.qa button,.hb-b,.hb-r,.hb-all,.fb-btn,.tback,.lang-b,.ctype,.tabs button,.tabs a):not(:disabled,.dt-h,.acc-h,.cg-i,.scan-th,summary,.list a.main,.navrows a,#side nav a,#bottom a,.tnav a):hover{scale:1.06;filter:brightness(1.07);cursor:pointer}
  /* ✕ close buttons: lighter circle + a slightly bigger pop */
  :is(#modal .box>header .icon[data-act="closeModal"],[data-act="closeModal"].icon,button[aria-label="Close"],.x-close):hover{scale:1.12;background:rgba(127,127,127,.06)!important;filter:brightness(1.1)}
  /* nothing grows while a drop-down is sliding (no vibration) */
  html.sliding *{scale:none!important}
}

/* Courts → My courts cards (client, 24 Nov 2026): the card itself is NOT clickable, so only the button under the mouse reacts —
   never the whole card / section. Same for any plain card that only holds buttons. */
