/* Pointer interactions for the public Patient page. */
@layer patient-pointer {
  /* Silver marks the current choice. Ink and sea-glass tints acknowledge an available action. */
  html[data-public-audience="patient"] {
    --patient-action-ink:#164b61;
    --patient-action-light:#d7eaf0;
    --patient-option-hover:rgb(151 212 229 / 18%);
  }
  @media (hover:hover) and (pointer:fine) {
    .site-header .nav-visit:hover,
    :is(#lower-back .lumbar-open, #visit-start, #contact .btn.primary):hover {
      background-color:var(--patient-action-ink)!important;
    }
    .site-header .is-stuck .nav-visit:hover,
    .site-header .menu-primary-action:hover,
    #top .light-pill:hover,
    #fusion-approaches .z4-cta-link:hover {
      background-color:var(--patient-action-light)!important;
    }
    @media (max-width:760px) {
      #top .light-pill:hover {
        background-color:var(--patient-action-ink)!important;
        color:white!important;
      }
    }
    #fusion-approaches .z4-cta-link:hover {transform:none!important}
    #difference [role="tab"][aria-selected="false"]:hover,
    #fusion-approaches .z4-view-buttons [aria-pressed="false"]:hover {
      background-color:var(--patient-option-hover)!important;
      color:#fff!important;
    }
    #patient-faq .knowledge-toggle:hover .knowledge-toggle-icon,
    #patient-faq .knowledge-add[aria-pressed="false"]:hover .knowledge-add-icon {
      background-color:#d4e9ed!important;color:#164b61!important;
    }
    #fusion-approaches .z4-topic summary:hover > span:nth-child(2) {color:#a9dce6!important}
    #top .play-link:hover, #patient-faq .knowledge-guide-link:hover, #contact summary:hover {
      text-decoration:underline!important;text-underline-offset:.2em;
    }
    #patient-faq .knowledge-guide-link:hover {color:var(--patient-action-ink)!important}
  }
  @media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
    :is(.site-header .nav-visit, .site-header .menu-primary-action, #top .light-pill,
        #lower-back .lumbar-open, #visit-start, #contact .btn.primary, #fusion-approaches .z4-cta-link,
        #difference [aria-selected="false"][role="tab"], #fusion-approaches .z4-view-buttons [aria-pressed="false"],
        #patient-faq .knowledge-toggle-icon, #patient-faq .knowledge-add-icon) {
      transition:background-color 140ms var(--zt-editorial-ease),color 140ms var(--zt-editorial-ease)!important;
    }
  }

  #stories .series-browse {position:relative!important}
  #stories .story-lookahead[hidden],html:not([data-patient-pointer]) #stories .story-lookahead {display:none!important}
  #stories .story-lookahead {
    position:absolute;z-index:6;inset-inline-end:0;bottom:100%;
    width:min(218px,calc(100vw - 40px));padding-bottom:6px;text-align:left;pointer-events:auto;
  }
  #stories .story-lookahead[data-below] {top:100%;bottom:auto;padding:6px 0 0}
  #stories .story-lookahead-sheet {
    padding:12px 14px;background:#fbfcfc;color:#14394b;border:1px solid #c0d4da;border-radius:9px;
    box-shadow:0 6px 18px rgb(12 44 61 / 12%);font:400 14px/1.3 var(--zt-font-body,Inter,Arial,sans-serif);
  }
  #stories .story-lookahead-label {display:block;margin:0 0 7px;color:#466271;font-size:12px;font-weight:600}
  #stories .story-lookahead-film {display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:10px;margin:0}
  #stories .story-lookahead-film + .story-lookahead-film {padding-top:6px;margin-top:6px;border-top:1px solid #e3ebee}
  #stories .story-lookahead-film img {width:44px!important;height:36px!important;object-fit:cover!important;border-radius:3px}
  #stories .story-lookahead-film strong {font-weight:600}
  #stories .story-lookahead-film > span {margin:0;font-size:12px;font-variant-numeric:tabular-nums;color:#4d6470}
  @media (prefers-reduced-motion:no-preference) {
    #stories .story-lookahead:not([hidden]) .story-lookahead-sheet {animation:patient-story-arrival 150ms var(--zt-editorial-ease)}
    #stories .story-lookahead[data-below] {--story-entry-offset:-3px}
    @keyframes patient-story-arrival {from{opacity:.55;transform:translateY(var(--story-entry-offset,3px))}to{opacity:1;transform:none}}
  }

  html[data-patient-pointer] #fusion-approaches .z4-handle {
    transform:translate(-50%,-50%) scale(var(--patient-grip-scale,1))!important;
    transform-origin:center!important;
  }
  @media (hover:hover) and (pointer:fine) {
    html[data-patient-pointer] #stories .series-arrow[aria-disabled="false"]:hover {background:#10374a!important;border-color:#10374a!important;color:#fff!important}
    /* The divider lets events through. Only its round handle needs a hover target. */
    html[data-patient-pointer] #fusion-approaches .z4-handle {pointer-events:auto!important;cursor:ew-resize!important}
    html[data-patient-pointer] #fusion-approaches .z4-handle:hover {--patient-grip-scale:1.08}
  }
  html[data-patient-pointer] #stories .series-arrow[aria-disabled="false"]:focus-visible {background:#10374a!important;border-color:#10374a!important;color:#fff!important}
  @media (prefers-reduced-motion:no-preference) {
    html[data-patient-pointer] #fusion-approaches .z4-handle {transition:transform 160ms var(--zt-editorial-ease)!important}
  }
}
