/* V13.6 — premium white design controls, role-based typography and page presets */
:root{
  --sg-page-max:1180px;
}
html,body{background:#fff;color:var(--ink)}
body{font-family:var(--font-family-body);font-weight:var(--font-weight-body)}
main p,main li,main dd,main td,main th,.prose-large{font-family:var(--font-family-body);font-weight:var(--font-weight-body)}
main small,.eyebrow,.meta,.section-kicker{font-family:var(--font-family-body);font-weight:var(--font-weight-small)}
main h1,.editorial-detail-grid h1,.v10-hero h1,.v11-detail-hero h1{font-family:var(--font-family-heading);font-weight:var(--font-weight-h1)!important}
main h2,.section-heading h2,.v10-authority-grid h2{font-family:var(--font-family-heading);font-weight:var(--font-weight-h2)!important}
main h3{font-family:var(--font-family-heading);font-weight:var(--font-weight-h3)!important}
.apple-main-nav>.nav-group>.nav-link,.apple-main-nav>.nav-link,.nav-link{font-family:var(--font-family-menu);font-weight:var(--font-weight-menu)!important;letter-spacing:-.01em}
.button,.button-outline,button,.sg-cta,.symptom-assistant-link{font-family:var(--font-family-button);font-weight:var(--font-weight-button)!important}
.catalog-card h2,.v10-symptom-card strong,.v11-procedure-card h3,.sg-visual-menu-card b,.apple-mega-link-list b,.social-tile h3{font-family:var(--font-family-card);font-weight:var(--font-weight-card-title)!important}
.catalog-card p,.v10-symptom-card small,.v11-procedure-card p,.sg-visual-menu-card small,.social-tile p{font-family:var(--font-family-card);font-weight:var(--font-weight-card-text)!important}

/* The global canvas is intentionally light. Dark is used only for focused accent panels. */
.site-main,main,.medical-page,.v11-diagnostic-page,.listing-page{background:#fff}
.medical-hero,.v11-detail-hero{background:linear-gradient(180deg,#fff 0%,#f7fafc 100%)}
.article-content>section:not(.answer-box):not(.visual-clinical-map),.procedure-expectation-table,.procedure-facts{color:var(--ink)}

/* Navigation remains compact and stable even when every card has an image. */
.apple-main-nav>.nav-group>.nav-link,.apple-main-nav>.nav-link{font-size:max(15px,var(--font-menu))!important}
.apple-main-nav>.nav-group>.nav-link:hover,.apple-main-nav>.nav-link:hover{color:var(--primary);text-shadow:0 0 20px color-mix(in srgb,var(--primary) 28%,transparent);transform:translateY(-1px)}
.apple-main-nav>.nav-group>.nav-link,.apple-main-nav>.nav-link{transition:color .18s ease,transform .18s ease,text-shadow .18s ease}
.sg-visual-menu-card,.apple-mega-link-list a{min-height:0!important}
.sg-visual-menu-card .sg-menu-media,.apple-mega-link-list a>img{aspect-ratio:16/10!important;max-height:108px!important;min-height:82px!important;object-fit:cover!important}
.sg-visual-menu-card{border:1px solid #e4eaf0!important;background:#fff!important;box-shadow:0 12px 30px rgba(13,39,64,.055)!important;overflow:hidden}
.sg-visual-menu-card:hover{transform:translateY(-3px);border-color:color-mix(in srgb,var(--primary) 42%,#e4eaf0)!important;box-shadow:0 18px 42px rgba(13,39,64,.10)!important}

/* Per-content design overrides. Values are set inline on the article by trusted admin settings. */
.sg-page-design{--page-body:var(--font-body);--page-h1:var(--font-h1);--page-h2:var(--font-h2);--page-h3:var(--font-h3);--page-body-weight:var(--font-weight-body);--page-h1-weight:var(--font-weight-h1);--page-h2-weight:var(--font-weight-h2);--page-h3-weight:var(--font-weight-h3);--page-family:var(--font-family-body)}
.sg-page-design.sg-custom-type{font-family:var(--page-family)}
.sg-page-design.sg-custom-type p,.sg-page-design.sg-custom-type li,.sg-page-design.sg-custom-type td,.sg-page-design.sg-custom-type th,.sg-page-design.sg-custom-type dd{font-family:var(--page-family)!important;font-size:var(--page-body)!important;font-weight:var(--page-body-weight)!important}
.sg-page-design.sg-custom-type h1{font-size:var(--page-h1)!important;font-weight:var(--page-h1-weight)!important}
.sg-page-design.sg-custom-type h2{font-size:var(--page-h2)!important;font-weight:var(--page-h2-weight)!important}
.sg-page-design.sg-custom-type h3{font-size:var(--page-h3)!important;font-weight:var(--page-h3-weight)!important}
.sg-page-design.sg-width-narrow .article-layout,.sg-page-design.sg-width-narrow .medical-hero-grid,.sg-page-design.sg-width-narrow .v11-detail-hero-grid{max-width:1040px}
.sg-page-design.sg-width-wide .article-layout,.sg-page-design.sg-width-wide .medical-hero-grid,.sg-page-design.sg-width-wide .v11-detail-hero-grid{max-width:1360px}
.sg-page-design.sg-hero-center .medical-hero-grid,.sg-page-design.sg-hero-center .v11-detail-hero-grid{grid-template-columns:1fr;max-width:980px;text-align:center}
.sg-page-design.sg-hero-center .medical-hero-image,.sg-page-design.sg-hero-center .v11-detail-hero-image{max-width:760px;margin-inline:auto}
.sg-page-design.sg-hero-minimal .medical-hero-image,.sg-page-design.sg-hero-minimal .v11-detail-hero-image{display:none}
.sg-page-design.sg-hero-minimal .medical-hero-grid,.sg-page-design.sg-hero-minimal .v11-detail-hero-grid{grid-template-columns:1fr;max-width:980px}
.sg-template-clinical-premium .answer-box{border-left:4px solid var(--primary)}
.sg-template-advanced-endoscopy .medical-hero,.sg-template-advanced-endoscopy .v11-detail-hero{background:linear-gradient(135deg,#f7fbff 0%,#eef9fb 100%)}
.sg-template-advanced-endoscopy .eyebrow,.sg-template-advanced-endoscopy .v11-kicker{color:#087e89}
.sg-template-editorial .article-content{font-family:Georgia,"Times New Roman",serif}
.sg-template-editorial .article-content p,.sg-template-editorial .article-content li{font-family:Georgia,"Times New Roman",serif}
.sg-template-minimal-white .procedure-journey-shell,.sg-template-minimal-white .procedure-expectation-table{box-shadow:none!important;border-color:#edf1f4!important}
.sg-card-outline .answer-box,.sg-card-outline .procedure-facts,.sg-card-outline .article-content>section{box-shadow:none!important;border:1px solid #e2e8ee!important}
.sg-card-elevated .answer-box,.sg-card-elevated .procedure-facts,.sg-card-elevated .article-content>section{box-shadow:0 18px 48px rgba(11,32,54,.08)!important}

@media(max-width:760px){
  .sg-visual-menu-card .sg-menu-media,.apple-mega-link-list a>img{max-height:94px!important;min-height:72px!important}
  .sg-page-design.sg-custom-type{--page-body:var(--font-mobile-body);--page-h1:var(--font-mobile-h1);--page-h2:var(--font-mobile-h2);--page-h3:var(--font-mobile-h3)}
}
/* Compact visual mega menu: standard media cards must never cover the whole menu. */
@media(min-width:1281px){
  .apple-mega-link-list{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;align-content:start!important}
  .apple-mega-link-list>a.sg-visual-menu-card{aspect-ratio:16/9!important;min-height:96px!important;max-height:124px!important;border-radius:14px!important}
  .apple-mega-link-list>a.sg-visual-menu-card>span:nth-child(2){left:11px!important;right:30px!important;bottom:10px!important}
  .apple-mega-link-list>a.sg-visual-menu-card b{font-size:13px!important;line-height:1.08!important}
  .apple-mega-link-list>a.sg-visual-menu-card small{font-size:9px!important;margin-top:3px!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .apple-mega-link-list>a.sg-visual-menu-card i{right:9px!important;bottom:9px!important;width:22px!important;height:22px!important;font-size:13px!important}
  .apple-mega-featured>a{min-height:168px!important;max-height:220px!important;border-radius:18px!important;padding:18px!important}
  .apple-mega-featured strong{font-size:20px!important}
  .sg-mega-child-cards>a{min-height:58px!important;padding:7px 9px!important}
  .sg-mega-child-image{width:52px!important}
}
