/* Shared responsive contract. No root overflow clipping, no lateral chat rail. */
*,*::before,*::after{box-sizing:border-box}
.cm-site-shell,.cm-site-shell #main,.cm-site-shell .grid>*,.cm-site-shell .flex>*,.cm-article,.cm-card,.gh-content,.nw-main,.nw-hero{min-width:0}
.cm-site-shell #main,.cm-site-shell footer{overflow-wrap:anywhere}
.cm-site-shell :where(img,video,iframe,svg){max-width:100%}
.cm-hero-decoration{position:absolute;inset:0;overflow:clip;pointer-events:none}
.cm-hero-decoration+div{position:relative;z-index:1}
/* All existing public editorias remain reachable by touch, keyboard and scrollbar. */
.nw-nav-in{max-width:100%;min-width:0;overflow-x:auto;overflow-y:visible;scrollbar-width:thin;scrollbar-color:var(--cm-u-border-strong) transparent;scroll-snap-type:x proximity;scroll-padding-inline:1rem;-webkit-mask-image:none;mask-image:none;-webkit-overflow-scrolling:touch}
.nw-nav-in::-webkit-scrollbar{display:block;height:5px}
.nw-nav-in::-webkit-scrollbar-thumb{background:var(--cm-u-border-strong);border-radius:999px}
.nw-nav-in:focus-visible{outline:2px solid var(--cm-u-primary);outline-offset:-2px}
.nw-tab{scroll-snap-align:start;min-height:44px;display:inline-flex;align-items:center}
/* Header switches navigation as a whole; no md:flex + lg:hidden collision. */
.cm-site-header .cm-header-inner,.cm-site-header .cm-header-actions{min-width:0}
@media(max-width:1199px){
 .cm-site-header .cm-header-nav{display:none}
 .cm-site-header [data-cm-burger]{display:inline-flex;flex:none}
 .cm-site-header [data-cm-menu]:not([hidden]){display:block}
 .cm-site-header [data-cm-menu]{max-height:calc(100dvh - 192px - env(safe-area-inset-bottom,0px));overflow-y:auto;overscroll-behavior:contain}
}
@media(min-width:1200px){
 .cm-site-header .cm-header-nav{display:flex}
 .cm-site-header [data-cm-burger],.cm-site-header [data-cm-menu]{display:none}
}
@media(max-width:1023px){
 :root{--cm-fluid-gutter:clamp(16px,4vw,20px);--cm-safe-gutter:max(var(--cm-fluid-gutter),env(safe-area-inset-left,0px),env(safe-area-inset-right,0px))}
 .cm-wrap,.cm-narrow,.cm-site-shell .max-w-6xl{max-width:100%;padding-inline:var(--cm-safe-gutter)}
 .nw-main,.nw-hero,.nw-story-layout,.nw-blog-layout,.nw-blog-main,.nw-sidebar{max-width:100%;min-width:0}
 .cm-site-shell #main .gh-content .kg-width-wide,.cm-site-shell #main .gh-content .kg-width-full{width:100%;max-width:100%;left:auto;transform:none;margin-inline:0}
 .gh-content :is(pre,table){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
 .gh-content table{display:block}
 .gh-content :is(.kg-gallery-container,.kg-gallery-row,.kg-gallery-image,.kg-bookmark-container,.kg-bookmark-content){min-width:0;max-width:100%}
 .gh-content :is(img,video),.cm-feature img{height:auto}
 .gh-content .kg-embed-card{max-width:100%}
 .gh-content iframe{max-width:100%}
 .gh-content iframe:is([src*="youtube"],[src*="vimeo"]){width:100%;height:auto;aspect-ratio:16/9}
 .gh-content .kg-button-card .kg-btn{max-width:100%;white-space:normal;overflow-wrap:anywhere;height:auto;min-height:44px;padding-block:.75rem}
 .nw-story-main .cm-hero-in,.nw-story-main .gh-content,.nw-story-main>.cm-narrow,.nw-story-main .cm-feature{padding-inline:0}
 .nw-pag{flex-wrap:wrap;justify-content:center}
}
@media(max-width:1023px){
 :root{--cm-mobile-radius:.75rem;--cm-mobile-dock:calc(64px + env(safe-area-inset-bottom,0px));--cm-mobile-header-space:88px}
 html{scroll-padding-block-end:calc(var(--cm-mobile-dock) + 16px)}
 body{padding-bottom:var(--cm-mobile-dock)}
 .cm-site-header .cm-header-inner{gap:8px;padding-block:8px;min-height:64px;height:auto}
 .cm-site-header .cm-header-brand{min-width:0;flex:0 1 auto}
 .cm-site-header svg.cm-hdr{width:clamp(96px,28vw,148px);height:auto;max-width:100%}
 .cm-site-header .cm-header-actions{gap:6px;flex:none}
 .cm-site-header .cm-theme-btn,.cm-site-header [data-cm-burger]{width:44px;height:44px;min-width:44px;flex:none}
 .cm-site-header .cm-header-cta{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:.55rem .65rem;font-size:.75rem;line-height:1.3;white-space:nowrap}
 .cm-site-header [data-cm-menu] a{min-height:44px;white-space:normal}
 .cm-site-shell :is(.cm-card,.nw-lead-img,.rounded-3xl,.rounded-2xl){border-radius:var(--cm-mobile-radius)}
 .cm-site-shell .cm-card-body{min-width:0}
 .cm-site-shell footer .grid{column-gap:1rem}
 .cm-site-shell footer a:not([aria-label]){display:inline-flex;align-items:center;min-height:44px}
 .cm-site-shell #main :is(h1,h2,h3,p,li,a){min-width:0;overflow-wrap:anywhere}
 .cm-site-shell #main :is(input,textarea,select){max-width:100%;min-width:0;font-size:16px}
 .cm-site-shell #main :is(.kg-bookmark-container,.kg-gallery-row){flex-wrap:wrap}
 .cm-site-shell #main :is(button,.cm-btn){min-height:44px;max-width:100%;white-space:normal}
 .cm-site-shell #main .cm-btn{display:inline-flex;align-items:center;justify-content:center}
 /* Scale the artwork, never crop it: 320px layout has a 288px content box. */
 .nw-ad-banner,.nw-ad-banner picture,.nw-ad-banner img{max-width:100%}
 .nw-ad-banner img{object-fit:contain}
 .nw-live{max-width:100%;white-space:normal}
 .nw-sidebar{min-width:0}
 /* Opaque bottom dock = a bounded toolbar, not a floating circle over prose. */
 .cm-chat-btn{position:fixed;inset:auto 0 0;width:100%;height:var(--cm-mobile-dock);padding:8px max(16px,env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));display:flex;align-items:center;justify-content:center;gap:12px;border:0;border-top:1px solid var(--cm-u-border);border-radius:0;background:var(--cm-u-surface);color:var(--cm-u-text);box-shadow:0 -2px 8px rgba(0,0,0,.05);transform:none}
 .cm-chat-btn .cm-bot{width:44px;height:44px;flex:0 0 44px}
 .cm-chat-btn::after{content:attr(aria-label);font-family:inherit;font-size:.875rem;font-weight:600;line-height:1.4;color:var(--cm-u-text)}
 .cm-chat-btn:hover,.cm-chat-btn[aria-expanded="true"]{transform:none}
 .cm-chat-btn:focus-visible{outline:2px solid var(--cm-u-primary);outline-offset:-4px;border-radius:0}
 .cm-chat{left:max(8px,env(safe-area-inset-left,0px));right:max(8px,env(safe-area-inset-right,0px));width:auto;max-width:none;bottom:calc(var(--cm-mobile-dock) + 8px);height:min(560px,calc(100dvh - var(--cm-mobile-dock) - var(--cm-mobile-header-space)));border-radius:var(--cm-mobile-radius)}
 .cm-chat-head,.cm-chat-log,.cm-chat-form{min-width:0}
 .cm-chat-x,.cm-chat-send{min-width:44px;min-height:44px}
 [data-cm-cookie]{bottom:var(--cm-mobile-dock);max-height:calc(100dvh - var(--cm-mobile-dock) - 16px);overflow-y:auto}
 [data-cm-cookie] .flex-none{flex-wrap:wrap}
 [data-cm-cookie] button{flex:1 1 auto;min-height:44px}
}
@media(max-width:359px){
 :root{--cm-mobile-header-space:136px}
 .cm-site-header .cm-header-inner{display:grid;grid-template-columns:minmax(0,1fr) 96px;column-gap:8px;row-gap:8px}
 .cm-site-header .cm-header-brand{grid-column:1;grid-row:1}
 .cm-site-header svg.cm-hdr{width:144px}
 .cm-site-header .cm-header-actions{display:contents}
 .cm-site-header .cm-theme-btn{grid-column:2;grid-row:1;justify-self:end;margin-right:52px}
 .cm-site-header [data-cm-burger]{grid-column:2;grid-row:1;justify-self:end}
 .cm-site-header .cm-header-cta{grid-column:1/-1;grid-row:2;justify-self:stretch;white-space:normal}
 .cm-site-shell footer .grid{column-gap:.75rem}
}
