/* MARK FUEL — "press key" buttons.
   One shared look for every dark-navy action button and the four home tiles, taken from the trial's
   "العودة إلى شاشة الدخول" button and the subscription journey's "اشترك الآن" (.mfj-btn): a solid edge under
   the button (0 3px 0) that it sinks into when pressed (down 2px, edge 1px). The press is instant and the release
   springs back in .12s. press-keys.js holds .mf-pressed for a moment on touch so a quick tap still shows the key going down.
   Also the daily-review settings buttons (goals, +10, red freeze) in their own colours.
   Tabs, filter chips and toggles stay flat on purpose: they show a state, not an action.
   To make another button a key, add its selector to the three lists below (they must stay identical). */

@property --mf-key{syntax:'*';inherits:false}

/* 1. Which controls are keys (press-keys.js reads --mf-key). */
:is(
  #mfTrialHomeBtn,
  .mf-button:not(.mf-whatsapp-link,.mf-done,[role=tab],[aria-pressed]):not(:is(.mf-table,.mf-actions,.mf-dialog-body,.mf-card-row,.mf-cloud) button):not(.cc-legacy:not(.cc-fin-host) *),
  .mf-push-prompt-allow,
  .mf-renew-now,
  .mf-rating-open:not(:disabled),
  .mf-rating-submit,
  .mf-password-form .mf-password-save,
  .mf-save-top,
  .mf-mistakes-go:not(.is-locked),
  .mf-freeze-ok,
  [data-practice-card],
  #brandStoryModal #closeBrandStoryFooterBtn,
  .mf-pdf-footer #mfPdfApply,
  :is(button,a)[class*="bg-[#0B2E59]"]:not([aria-pressed],[role=tab],#toggleFreezeDayBtn):not(.cc-legacy:not(.cc-fin-host) *),
  .mfcc .cc-legacy:not(.cc-fin-host) button[type=submit]:not(.cc-keep,[role=tab],.mf-copy-value,.cc-x),
  #mfjRenewDialog .mfj-choice.is-main,
  .mfcc .btn.primary:not(.bulk *),
  #openDailyStudyBtn,
  #openWeakStudyBtn,
  #openCurriculumScreenBtn,
  #openLibraryScreenBtn,
  :is(#mfDailyGoals,#mfMonthlyGoal) .mf-actions button,
  #toggleFreezeDayBtn:not(:disabled)
){
  --mf-key:1;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}

/* 2. Resting: the edge under the key. */
html body :is(
  #mfTrialHomeBtn,
  .mf-button:not(.mf-whatsapp-link,.mf-done,[role=tab],[aria-pressed]):not(:is(.mf-table,.mf-actions,.mf-dialog-body,.mf-card-row,.mf-cloud) button):not(.cc-legacy:not(.cc-fin-host) *),
  .mf-push-prompt-allow,
  .mf-renew-now,
  .mf-rating-open:not(:disabled),
  .mf-rating-submit,
  .mf-password-form .mf-password-save,
  .mf-save-top,
  .mf-mistakes-go:not(.is-locked),
  .mf-freeze-ok,
  [data-practice-card],
  #brandStoryModal #closeBrandStoryFooterBtn,
  .mf-pdf-footer #mfPdfApply,
  :is(button,a)[class*="bg-[#0B2E59]"]:not([aria-pressed],[role=tab],#toggleFreezeDayBtn):not(.cc-legacy:not(.cc-fin-host) *),
  .mfcc .cc-legacy:not(.cc-fin-host) button[type=submit]:not(.cc-keep,[role=tab],.mf-copy-value,.cc-x),
  #mfjRenewDialog .mfj-choice.is-main,
  .mfcc .btn.primary:not(.bulk *),
  #openDailyStudyBtn,
  #openWeakStudyBtn,
  #openCurriculumScreenBtn,
  #openLibraryScreenBtn,
  :is(#mfDailyGoals,#mfMonthlyGoal) .mf-actions button,
  #toggleFreezeDayBtn:not(:disabled)
){
  box-shadow:0 var(--key-depth,3px) 0 var(--key-edge,#061D3A)!important;
  transform:none;
  transition:transform .12s cubic-bezier(.2,.7,.2,1),box-shadow .12s cubic-bezier(.2,.7,.2,1),background-color .18s,border-color .18s,color .18s!important;
}

/* 3. Pressed: the key sinks onto its edge, instantly. */
html body :is(
  #mfTrialHomeBtn,
  .mf-button:not(.mf-whatsapp-link,.mf-done,[role=tab],[aria-pressed]):not(:is(.mf-table,.mf-actions,.mf-dialog-body,.mf-card-row,.mf-cloud) button):not(.cc-legacy:not(.cc-fin-host) *),
  .mf-push-prompt-allow,
  .mf-renew-now,
  .mf-rating-open:not(:disabled),
  .mf-rating-submit,
  .mf-password-form .mf-password-save,
  .mf-save-top,
  .mf-mistakes-go:not(.is-locked),
  .mf-freeze-ok,
  [data-practice-card],
  #brandStoryModal #closeBrandStoryFooterBtn,
  .mf-pdf-footer #mfPdfApply,
  :is(button,a)[class*="bg-[#0B2E59]"]:not([aria-pressed],[role=tab],#toggleFreezeDayBtn):not(.cc-legacy:not(.cc-fin-host) *),
  .mfcc .cc-legacy:not(.cc-fin-host) button[type=submit]:not(.cc-keep,[role=tab],.mf-copy-value,.cc-x),
  #mfjRenewDialog .mfj-choice.is-main,
  .mfcc .btn.primary:not(.bulk *),
  #openDailyStudyBtn,
  #openWeakStudyBtn,
  #openCurriculumScreenBtn,
  #openLibraryScreenBtn,
  :is(#mfDailyGoals,#mfMonthlyGoal) .mf-actions button,
  #toggleFreezeDayBtn:not(:disabled)
):not(:disabled):is(:active,.mf-pressed){
  transform:translateY(calc(var(--key-depth,3px) - 1px))!important;
  box-shadow:0 1px 0 var(--key-edge,#061D3A)!important;
  transition-duration:0s!important;
}

/* Hover: a slightly lighter navy, as on the journey's "اشترك الآن" (it used to jump to sky blue on some). */
@media (hover:hover){
  html:not([data-theme=dark]) body :is(
    .mf-push-prompt-allow,.mf-rating-open:not(:disabled),.mf-rating-submit:not(:disabled),.mf-save-top,
    .mf-mistakes-go:not(.is-locked),.mf-freeze-ok,.mf-renew-now,
    :is(button,a)[class*="bg-[#0B2E59]"]:not([aria-pressed],[role=tab],#toggleFreezeDayBtn,:disabled):not(.cc-legacy:not(.cc-fin-host) *)
  ):hover{background-color:#12427A!important}
}

/* Home tiles keep their own colours; each gets an edge that matches it. */
#openDailyStudyBtn{--key-depth:4px}
:where(#openWeakStudyBtn,#openCurriculumScreenBtn,#openLibraryScreenBtn){--key-edge:#CBD5E1}

/* Daily review settings: the light goal buttons get a soft blue edge, the red freeze button a deep red one. */
:where(#mfDailyGoals,#mfMonthlyGoal) .mf-actions button{--key-edge:#B9CDE4}
:where(#toggleFreezeDayBtn){--key-edge:#991B1B}

/* Leaderboard entry: the whole card is the button, its navy "open" pill is the key. */
#mfLbEntry{--mf-key:1;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
#mfLbEntry .mf-lb-entry-go{transition:transform .12s cubic-bezier(.2,.7,.2,1),box-shadow .12s cubic-bezier(.2,.7,.2,1)}
html body #mfLbEntry .mf-lb-entry-go{box-shadow:0 3px 0 var(--key-edge,#061D3A)}
html body #mfLbEntry:is(:active,.mf-pressed) .mf-lb-entry-go{transform:translateY(2px);box-shadow:0 1px 0 var(--key-edge,#061D3A);transition-duration:0s}

/* Dark theme: these turn blue in the dark, so their edge is navy; navy keys get a deeper edge. */
html[data-theme=dark] :where(
  .mf-button,.mf-push-prompt-allow,.mf-renew-now,.mf-rating-open,.mf-rating-submit,.mf-save-top,
  .mf-mistakes-go,.mf-freeze-ok,#mfjRenewDialog .mfj-choice.is-main,#mfLbEntry .mf-lb-entry-go
){--key-edge:#0B2E59}
html[data-theme=dark] :where(#mfTrialHomeBtn,[data-practice-card],#openDailyStudyBtn,:is(button,a)[class*="bg-[#0B2E59]"]){--key-edge:#020B18}
html[data-theme=dark] :where(.mfcc .btn.primary,.mfcc .cc-legacy:not(.cc-fin-host) button[type=submit]:not(.cc-keep,[role=tab],.mf-copy-value,.cc-x)){--key-edge:#6B7F97}
html[data-theme=dark] :where(.mfcc[data-concept="c"] .btn.primary){--key-edge:#020B18}
html[data-theme=dark] :where(#openWeakStudyBtn,#openCurriculumScreenBtn,#openLibraryScreenBtn,#mfDailyGoals .mf-actions button,#mfMonthlyGoal .mf-actions button){--key-edge:#2A4C78}
html[data-theme=dark] :where(#toggleFreezeDayBtn){--key-edge:#7F1D1D}

/* Google sign-in: a white key. Google's own button sits invisibly on top, so press-keys.js shows the press. */
#mfGoogleLogin{box-sizing:content-box;padding-bottom:3px;-webkit-tap-highlight-color:transparent}
#mfGoogleLogin .mf-gl-face{bottom:3px!important;box-shadow:0 3px 0 #CFDBE8!important;transition:transform .12s cubic-bezier(.2,.7,.2,1),box-shadow .12s cubic-bezier(.2,.7,.2,1),border-color .18s}
#mfGoogleLogin:hover .mf-gl-face{box-shadow:0 3px 0 #B9D4F3!important}
#mfGoogleLogin:is(:active,.mf-pressed) .mf-gl-face{transform:translateY(2px)!important;box-shadow:0 1px 0 #B9D4F3!important;transition-duration:0s}

/* Reduced motion: nothing moves; the edge still closes and the key darkens, so the press is still felt. */
@media (prefers-reduced-motion:reduce){
  html body :is(
  #mfTrialHomeBtn,
  .mf-button:not(.mf-whatsapp-link,.mf-done,[role=tab],[aria-pressed]):not(:is(.mf-table,.mf-actions,.mf-dialog-body,.mf-card-row,.mf-cloud) button):not(.cc-legacy:not(.cc-fin-host) *),
  .mf-push-prompt-allow,
  .mf-renew-now,
  .mf-rating-open:not(:disabled),
  .mf-rating-submit,
  .mf-password-form .mf-password-save,
  .mf-save-top,
  .mf-mistakes-go:not(.is-locked),
  .mf-freeze-ok,
  [data-practice-card],
  #brandStoryModal #closeBrandStoryFooterBtn,
  .mf-pdf-footer #mfPdfApply,
  :is(button,a)[class*="bg-[#0B2E59]"]:not([aria-pressed],[role=tab],#toggleFreezeDayBtn):not(.cc-legacy:not(.cc-fin-host) *),
  .mfcc .cc-legacy:not(.cc-fin-host) button[type=submit]:not(.cc-keep,[role=tab],.mf-copy-value,.cc-x),
  #mfjRenewDialog .mfj-choice.is-main,
  .mfcc .btn.primary:not(.bulk *),
  #openDailyStudyBtn,
  #openWeakStudyBtn,
  #openCurriculumScreenBtn,
  #openLibraryScreenBtn,
  :is(#mfDailyGoals,#mfMonthlyGoal) .mf-actions button,
  #toggleFreezeDayBtn:not(:disabled)
  ),html body #mfLbEntry .mf-lb-entry-go,html body #mfGoogleLogin .mf-gl-face{transition:none!important}
  html body :is(
  #mfTrialHomeBtn,
  .mf-button:not(.mf-whatsapp-link,.mf-done,[role=tab],[aria-pressed]):not(:is(.mf-table,.mf-actions,.mf-dialog-body,.mf-card-row,.mf-cloud) button):not(.cc-legacy:not(.cc-fin-host) *),
  .mf-push-prompt-allow,
  .mf-renew-now,
  .mf-rating-open:not(:disabled),
  .mf-rating-submit,
  .mf-password-form .mf-password-save,
  .mf-save-top,
  .mf-mistakes-go:not(.is-locked),
  .mf-freeze-ok,
  [data-practice-card],
  #brandStoryModal #closeBrandStoryFooterBtn,
  .mf-pdf-footer #mfPdfApply,
  :is(button,a)[class*="bg-[#0B2E59]"]:not([aria-pressed],[role=tab],#toggleFreezeDayBtn):not(.cc-legacy:not(.cc-fin-host) *),
  .mfcc .cc-legacy:not(.cc-fin-host) button[type=submit]:not(.cc-keep,[role=tab],.mf-copy-value,.cc-x),
  #mfjRenewDialog .mfj-choice.is-main,
  .mfcc .btn.primary:not(.bulk *),
  #openDailyStudyBtn,
  #openWeakStudyBtn,
  #openCurriculumScreenBtn,
  #openLibraryScreenBtn,
  :is(#mfDailyGoals,#mfMonthlyGoal) .mf-actions button,
  #toggleFreezeDayBtn:not(:disabled)
  ):not(:disabled):is(:active,.mf-pressed),
  html body #mfLbEntry:is(:active,.mf-pressed) .mf-lb-entry-go,
  html body #mfGoogleLogin:is(:active,.mf-pressed) .mf-gl-face{transform:none!important;filter:brightness(.9)}
}
