/* Conservative related-resource cards within existing Tools detail layout. */
#fmh-app .fmh-cross-resource-mount{margin-top:24px}
#fmh-app .fmh-cross-resource-mount h3{font-size:18px;line-height:1.3;margin:0 0 16px}
#fmh-app .fmh-cross-resource-group{margin:0 0 16px}
#fmh-app .fmh-cross-resource-group h4{font-size:13px;font-weight:650;margin:0 0 8px}
#fmh-app .fmh-cross-resource-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
#fmh-app .fmh-cross-resource-card{display:block;border:1px solid #dbe4ee;border-radius:10px;padding:12px 14px;
text-decoration:none;color:inherit;background:#fff;font-size:13px;line-height:1.4;overflow-wrap:anywhere}
#fmh-app .fmh-cross-resource-card:hover,#fmh-app .fmh-cross-resource-card:focus-visible{border-color:#778da7;outline-offset:2px}
#fmh-app .fmh-cross-resource-disclaimer{font-size:12px;color:#596579;margin:12px 0 0}

/* Same approved DecisionNode, shared by Tools and Knowledge detail. */
#fmh-app .fmh-cross-resource-scope,.kb .fmh-cross-resource-scope{font-size:12px;line-height:1.5;color:#68748b;margin:0 0 16px}
.kb #kb-cross-related{margin:24px 0 12px;border-top:1px solid #e7eaf1;padding-top:20px}
.kb #kb-cross-related h3{font-size:19px;line-height:1.3;margin:0 0 8px}
.kb .fmh-cross-resource-group{margin:0 0 16px}
.kb .fmh-cross-resource-group h4{font-size:13px;margin:0 0 9px}
.kb .fmh-cross-resource-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:11px}
.kb .fmh-cross-resource-card{display:block;border:1px solid #e6e7ec;background:#fff;border-radius:10px;padding:12px;
  color:#291950;text-decoration:none;font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.kb .fmh-cross-resource-card:hover{border-color:#9672be}
.kb .fmh-cross-resource-card:focus-visible{outline:3px solid #ab78d5;outline-offset:2px}

/* Shared video card artwork; no artificial images or clinical links. */
#fmh-app .fmh-cross-resource-links{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
#fmh-app .fmh-cross-resource-card{display:flex;flex-direction:column;gap:8px;min-width:0;overflow:hidden}
#fmh-app .fmh-related-video-thumb{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:8px;background:#182642}
#fmh-app .fmh-related-card-title{display:block;font-weight:600}
#fmh-app .fmh-cross-resource-card small{color:#64748b;font-size:11px;line-height:1.4}
#fmh-app .fmh-cross-resource-mount{background:#f8f5fb;border-radius:15px;padding:20px}
@media(max-width:640px){#fmh-app .fmh-cross-resource-links{grid-template-columns:repeat(auto-fit,minmax(145px,1fr))}}

/* Compact thumbnails: avoid a single 16:9 image filling the entire protocol width. */
#fmh-app .fmh-cross-resource-links{display:flex;flex-wrap:wrap;align-items:stretch;gap:12px}
#fmh-app .fmh-cross-resource-card{width:235px;max-width:100%;flex:0 1 235px;padding:10px}
#fmh-app .fmh-related-video-thumb{width:100%;max-height:132px;aspect-ratio:16/9;object-fit:cover}
#fmh-app .fmh-cross-resource-group:has(.fmh-related-video-thumb) .fmh-cross-resource-links{justify-content:flex-start}
@media(max-width:540px){#fmh-app .fmh-cross-resource-card{flex-basis:100%;max-width:270px}}

/* Unified editorial layout for related 5MH content, desktop and mobile. */
#fmh-app .fmh-cross-resource-mount{padding:22px 24px;border:1px solid #eee6f3;background:#f8f5fb}
#fmh-app .fmh-related-summary-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:22px;align-items:start}
#fmh-app .fmh-related-summary-column{min-width:0}
#fmh-app .fmh-related-summary-column .fmh-cross-resource-group{margin:0 0 18px}
#fmh-app .fmh-related-summary-column .fmh-cross-resource-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#fmh-app .fmh-related-summary-videos .fmh-cross-resource-card{flex:none;width:100%;max-width:100%;padding:10px;min-width:0}
#fmh-app .fmh-related-summary-videos .fmh-related-video-thumb{max-height:none;width:100%;aspect-ratio:16/9}
#fmh-app .fmh-related-summary-references .fmh-cross-resource-links{grid-template-columns:minmax(0,1fr)}
#fmh-app .fmh-related-summary-references .fmh-cross-resource-card{flex:none;width:100%;max-width:100%;padding:12px 14px}
#fmh-app .fmh-related-summary-references .fmh-cross-resource-card small{line-height:1.35}
#fmh-app .fmh-related-tools-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;border-top:1px solid #e8dfef;padding-top:15px}
#fmh-app .fmh-related-tools-row .fmh-cross-resource-links{display:flex;flex-wrap:wrap;gap:8px}
#fmh-app .fmh-related-tools-row .fmh-cross-resource-card{width:auto;flex:1 1 150px;max-width:100%}
#fmh-app .fmh-related-tools-row .fmh-cross-resource-group{margin:0}
#fmh-app .fmh-cross-resource-disclaimer{margin-top:12px;max-width:760px}
@media(max-width:760px){
  #fmh-app .fmh-related-summary-grid{grid-template-columns:minmax(0,1fr);gap:4px}
  #fmh-app .fmh-related-summary-column .fmh-cross-resource-links{grid-template-columns:repeat(2,minmax(0,1fr))}
  #fmh-app .fmh-related-summary-references .fmh-cross-resource-links{grid-template-columns:minmax(0,1fr)}
  #fmh-app .fmh-cross-resource-mount{padding:16px}
}
@media(max-width:420px){
  #fmh-app .fmh-related-summary-videos .fmh-cross-resource-links{grid-template-columns:minmax(0,1fr)}
}

/* Final shared presentation across Tools and Knowledge Base. */
#fmh-app .fmh-related-drug-group .fmh-cross-resource-drug{
  font:inherit;text-align:left;cursor:pointer;color:#291950;font-weight:650;
  border:1px solid #e0d9ec;background:#fff;border-radius:10px;min-height:48px;
}
#fmh-app .fmh-related-drug-group .fmh-cross-resource-drug:hover,
#fmh-app .fmh-related-drug-group .fmh-cross-resource-drug:focus-visible{
  border-color:#8b69a5;outline-offset:2px
}
.kb .fmh-cross-resource-group h4{font-weight:650;color:#25134b}
.kb .fmh-cross-resource-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.kb .fmh-cross-resource-card{display:flex;flex-direction:column;gap:8px;min-width:0;transition:border-color .15s ease}
.kb .fmh-related-video-thumb{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:8px;background:#182642}
.kb .fmh-related-card-title{font-weight:650}
.kb .fmh-cross-resource-card small{color:#64748b;font-size:11px}

/* Global related-video carousel: two cards on desktop, one on mobile. */
#fmh-app .fmh-video-carousel{min-width:0}
#fmh-app .fmh-video-carousel .fmh-video-carousel-track,
.kb .fmh-video-carousel .fmh-video-carousel-track{
 display:flex;flex-wrap:nowrap;overflow-x:auto;scroll-snap-type:x mandatory;
 scrollbar-width:thin;gap:10px;max-width:100%;overscroll-behavior-x:contain}
#fmh-app .fmh-video-carousel .fmh-video-carousel-track>.fmh-cross-resource-card,
.kb .fmh-video-carousel .fmh-video-carousel-track>.fmh-cross-resource-card{
 flex:0 0 calc((100% - 10px)/2);width:calc((100% - 10px)/2);max-width:none;scroll-snap-align:start}
#fmh-app .fmh-video-carousel-controls,.kb .fmh-video-carousel-controls{display:flex;justify-content:flex-end;gap:7px;margin:7px 0 0}
#fmh-app .fmh-video-carousel-controls button,.kb .fmh-video-carousel-controls button{
 border:1px solid #d6ccdf;border-radius:8px;background:#fff;color:#291950;
 font-size:23px;width:34px;height:30px;line-height:1;cursor:pointer}
#fmh-app .fmh-video-carousel-controls button:disabled,.kb .fmh-video-carousel-controls button:disabled{opacity:.35;cursor:default}
@media(max-width:580px){
 #fmh-app .fmh-video-carousel .fmh-video-carousel-track>.fmh-cross-resource-card,
 .kb .fmh-video-carousel .fmh-video-carousel-track>.fmh-cross-resource-card{
 flex-basis:100%;width:100%}
}

/* Public access labels from the audited catalog projection, not entitlement. */
#fmh-app .fmh-related-access-badge,
.kb .fmh-related-access-badge{
  display:inline-block;align-self:flex-start;margin-top:7px;padding:3px 7px;
  border-radius:6px;background:#e9edf5;color:#2d145f;
  font-size:11px;font-weight:750;line-height:1.2;
}
#fmh-app .fmh-related-access-badge[data-access="free"],
.kb .fmh-related-access-badge[data-access="free"]{
  background:#ed1c5a;color:#fff;
}
/* Knowledge only: calculators occupy a centered row, never a narrow decision tile. */
.kb #kb-items>.fmh-kb-disease-calculators{flex:0 0 100%;width:100%;max-width:100%;min-width:0;margin:6px 0 4px}
.kb .fmh-calculator-group h4{text-align:center;margin:0 0 12px}
.kb .fmh-calculator-group .fmh-cross-resource-links{display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;gap:14px}
.kb .fmh-calculator-group .fmh-cross-resource-card{flex:0 1 224px;width:224px;max-width:100%;min-height:56px;justify-content:center}
@media(max-width:620px){
 .kb .fmh-calculator-group .fmh-cross-resource-card{flex:1 1 100%;width:100%;max-width:300px}
}

/* Decision-level recommendations: Original Studies-sized artwork, centered once
   after the paginated evidence; other Tools/video contexts stay unchanged. */
.kb #kb-cross-related>h3,.kb #kb-cross-related>.fmh-cross-resource-scope{text-align:center}
.kb #kb-cross-related .fmh-video-carousel h4{text-align:center}
.kb #kb-cross-related .fmh-video-carousel .fmh-video-carousel-track{
 display:flex;flex-wrap:wrap;justify-content:center;gap:16px;overflow:visible;scroll-snap-type:none}
.kb #kb-cross-related .fmh-video-carousel .fmh-video-carousel-track>.fmh-cross-resource-card{
 flex:0 1 266px;width:266px;max-width:100%;scroll-snap-align:none;padding:10px}
.kb #kb-cross-related .fmh-video-carousel .fmh-related-video-thumb{
 width:100%;max-height:none;aspect-ratio:16/9;object-fit:cover}
.kb #kb-cross-related .fmh-video-carousel .fmh-related-card-title{font-size:13px;line-height:1.4}
.kb #kb-cross-related .fmh-video-carousel-controls{display:none}
