/* Mr Pharmacist — complete MEDCORE tactile coverage v103
   Extends the existing MEDCORE parity layer to every remaining card/panel/tile surface.
   No layout, content, routing, data, account, or application-state changes. */

html[data-mrph-khalid-touch-feel="v99"] :where(
  article[class],
  [class$="-card"],[class*="-card "],
  [class$="-panel"],[class*="-panel "],
  [class$="-tile"],[class*="-tile "],
  .answer-box,.suite-empty,.mrph-student-panel-item
){
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
  transform:translateZ(0);
  box-shadow:var(--mrph-kt-card-shadow)!important;
  transition:
    transform var(--mrph-kt-fast) var(--mrph-kt-spring),
    box-shadow var(--mrph-kt-mid) var(--mrph-kt-ease),
    border-color var(--mrph-kt-mid) var(--mrph-kt-ease),
    background-color var(--mrph-kt-mid) var(--mrph-kt-ease),
    filter var(--mrph-kt-mid) var(--mrph-kt-ease),
    opacity var(--mrph-kt-mid) var(--mrph-kt-ease)!important;
}

html[data-mrph-khalid-touch-feel="v99"] :where(
  article[class],
  [class$="-card"],[class*="-card "],
  [class$="-panel"],[class*="-panel "],
  [class$="-tile"],[class*="-tile "],
  .answer-box,.suite-empty,.mrph-student-panel-item
).mrph-kt-card-pressing{
  transform:translateY(1px) scale(.992)!important;
  filter:brightness(.975) saturate(1.035)!important;
  box-shadow:0 8px 25px rgba(4,35,47,.20),inset 0 2px 6px rgba(4,35,47,.10)!important;
}

html[data-mrph-khalid-touch-feel="v99"] :where(
  article[class],
  [class$="-card"],[class*="-card "],
  [class$="-panel"],[class*="-panel "],
  [class$="-tile"],[class*="-tile "],
  .answer-box,.suite-empty,.mrph-student-panel-item
).mrph-kt-feel-host{
  position:relative;
  isolation:isolate;
}

html[data-mrph-khalid-touch-feel="v99"] :where(
  article[class],
  [class$="-card"],[class*="-card "],
  [class$="-panel"],[class*="-panel "],
  [class$="-tile"],[class*="-tile "],
  .answer-box,.suite-empty,.mrph-student-panel-item
).mrph-kt-feel-host::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  background:
    linear-gradient(120deg,transparent 0 17%,rgba(255,255,255,.085) 28%,transparent 43%),
    radial-gradient(circle at var(--mrph-kt-x,72%) var(--mrph-kt-y,0%),rgba(20,131,139,.17),transparent 35%);
  opacity:.72;
  mix-blend-mode:screen;
  transition:opacity var(--mrph-kt-mid) var(--mrph-kt-ease);
}

/* MEDCORE repaint isolation: the workspace itself never becomes a transformed tactile card. */
html[data-mrph-khalid-touch-feel="v99"] :where(
  #view,.content-area,.app-shell,.main-content,.workspace
){
  backface-visibility:visible!important;
  -webkit-backface-visibility:visible!important;
  transform:none!important;
  will-change:auto!important;
}

html[data-mrph-khalid-touch-feel="v99"] #view.mrph-kt-card-pressing,
html[data-mrph-khalid-touch-feel="v99"] .content-area.mrph-kt-card-pressing,
html[data-mrph-khalid-touch-feel="v99"] .app-shell.mrph-kt-card-pressing,
html[data-mrph-khalid-touch-feel="v99"] .main-content.mrph-kt-card-pressing,
html[data-mrph-khalid-touch-feel="v99"] .workspace.mrph-kt-card-pressing{
  transform:none!important;
  filter:none!important;
  opacity:1!important;
}

html[data-mrph-khalid-touch-feel="v99"] :where(
  #view,.content-area,.app-shell,.main-content,.workspace
).mrph-kt-feel-host::after{
  display:none!important;
  content:none!important;
}

/* Keep profile imagery continuously painted while other controls are pressed. */
html[data-mrph-khalid-touch-feel="v99"] :where(
  .profile-avatar,.profile-topbar-avatar
),
html[data-mrph-khalid-touch-feel="v99"] :where(
  .profile-avatar,.profile-topbar-avatar
) img{
  backface-visibility:visible!important;
  -webkit-backface-visibility:visible!important;
  transform:none!important;
  filter:none!important;
  opacity:1!important;
  will-change:auto!important;
}

html[data-mrph-khalid-touch-feel="v99"] :where(
  .profile-avatar,.profile-topbar-avatar
){
  isolation:isolate;
  contain:paint;
}

html[data-mrph-khalid-touch-feel="v99"] :where(
  .profile-avatar,.profile-topbar-avatar
).mrph-kt-feel-host::after{
  display:none!important;
  content:none!important;
}

/* MEDCORE navigation paint stability: route presses do not flash or recompose the sidebar. */
html[data-mrph-khalid-touch-feel="v99"] #sidebar :where(a,button,.nav-item){
  -webkit-tap-highlight-color:transparent!important;
  opacity:1!important;
  visibility:visible!important;
  backface-visibility:visible!important;
  -webkit-backface-visibility:visible!important;
  will-change:auto!important;
}

html[data-mrph-khalid-touch-feel="v99"] #sidebar :where(a,button,.nav-item):active,
html[data-mrph-khalid-touch-feel="v99"] #sidebar :where(a,button,.nav-item).mrph-kt-nav-pressing{
  transform:none!important;
  filter:none!important;
  opacity:1!important;
  visibility:visible!important;
  box-shadow:none!important;
}

html[data-mrph-khalid-touch-feel="v99"] #sidebar .mrph-kt-feel-host::after{
  display:none!important;
  content:none!important;
}

@media(hover:hover){
  html[data-mrph-khalid-touch-feel="v99"] :where(
    article[class],
    [class$="-card"],[class*="-card "],
    [class$="-panel"],[class*="-panel "],
    [class$="-tile"],[class*="-tile "],
    .answer-box,.suite-empty,.mrph-student-panel-item
  ):hover{
    box-shadow:var(--mrph-kt-card-hover)!important;
    border-color:var(--mrph-kt-line)!important;
    filter:brightness(1.035) saturate(1.045);
  }
}
