/* Shared desktop identity; mobile layout retains its established proportions. */
@media(min-width:1201px){
 :root body :is(.site-head,.nav-shell) .header-identity .header-wordmark{display:block;width:200px;height:auto;max-width:100%;object-fit:contain}
 :root body :is(.site-head,.nav-shell) .header-identity{min-width:0;flex-shrink:0}
}
@media(min-width:1201px) and (max-width:1400px){
 :root body :is(.site-head,.nav-shell) .header-identity .header-wordmark{width:180px}
 :root body :is(.site-head .wrap,.nav-shell nav){gap:18px}
 :root body :is(.site-head,.nav-shell) .global-nav{gap:18px}
}
@media(min-width:1201px) and (max-width:1400px){
 :root body :is(.site-head,.nav-shell)>nav.wrap{width:calc(100% - 48px);max-width:1352px;gap:12px;flex-wrap:nowrap}
 :root body :is(.site-head,.nav-shell) .global-nav{gap:12px;font-size:14px}
 :root body :is(.site-head,.nav-shell) .back-button{padding-inline:4px}
}

/* Keep disclosure grids and long headings within very narrow mobile viewports. */
@media(max-width:380px){
 :root body :is(.treatment-information-list,.treatment-steps,.cdt-phase-grid){grid-template-columns:minmax(0,1fr);min-width:0}
 :root body :is(.treatment-steps,.cdt-phase-grid)>*{min-width:0;overflow-wrap:anywhere}
 :root body .treatment-information-list>.treatment-disclosure{min-width:0;max-width:100%}
 :root body .treatment-information-list>.treatment-disclosure>summary{overflow-wrap:anywhere}
 :root body :is(h1,h2,h3) .punctuation-word{display:inline;white-space:normal;hyphens:auto;overflow-wrap:anywhere}
}

@media(max-width:380px){
 :root body .treatment-step{grid-template-columns:28px minmax(0,1fr);gap:10px 12px}
 :root body .treatment-step>b{grid-row:1;grid-column:1}
 :root body .treatment-step>h3{grid-row:1;grid-column:2;margin:0}
 :root body .treatment-step>p{grid-row:2;grid-column:1/-1;hyphens:auto}
}

/* Stable phone text when rotating: prevent UA text inflation, retain user zoom. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
@media(orientation:landscape) and (max-height:500px) and (max-width:1200px){
 :root{--type-page:2rem;--type-section:1.625rem;--type-card:1.375rem;--type-body:1rem;--type-label:1rem}
 :root body main h1,:root body main [data-type-role="page-title"]{font-size:var(--type-page)!important}
 :root body main h2,:root body main [data-type-role="section-title"],:root body .shared-care-principles h2{font-size:var(--type-section)}
 :root body main .clean-bio-block h2{font-size:1.4rem}
 :root body .clean-bio-block p{font-size:1rem}
 :root body .clean-bio-block p.clean-bio-emphasis{font-size:1.375rem;line-height:1.4;margin-top:24px}
 :root body.patient-home .clean-about-lead{font-size:1.125rem}
 :root body main :is(a.button,button.button,[data-type-role="action"]){font-size:1rem}
}

@media(orientation:landscape) and (max-height:500px) and (max-width:1200px){
 :root body main h1.blog-wordmark{font-size:2.5rem!important}
}
