/* Shared responsive layer: adapt to the viewport, pointer and supported features. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:1rem}
body{padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
img,video,canvas,iframe{max-width:100%}fieldset{min-width:0;min-inline-size:0}input,select,textarea{max-width:100%;box-sizing:border-box}input[type=file]{width:100%;min-width:0}
.form-grid>*,.hub-form-grid>*,.hub-layout>*,.completed-grid>*,.v5-grid>*,.hero-grid>*{min-width:0}
.cn-table-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}.cn-table-scroll:focus-visible{outline:3px solid #e7679c;outline-offset:3px}
.cn-app-access{margin-left:auto;font-size:13px;max-width:100%}.cn-app-access summary{cursor:pointer;padding:12px;min-height:44px;box-sizing:border-box}.cn-app-instructions{max-width:390px;padding:15px;border:1px solid #52c7c2;border-radius:10px;background:#fffdf7;color:#173640;line-height:1.6}.cn-app-instructions button{min-height:44px}.cn-app-instructions p{margin:8px 0}
.cn-session-countdown{max-width:calc(50vw - 24px);white-space:normal;line-height:1.3;bottom:calc(16px + env(safe-area-inset-bottom,0px))!important}
.cn-help-launch{bottom:calc(14px + env(safe-area-inset-bottom,0px));max-width:calc(50vw - 24px);white-space:normal}.cn-help-panel{bottom:calc(82px + env(safe-area-inset-bottom,0px));max-height:calc(var(--cn-visible-height,100vh) - 110px);max-height:calc(var(--cn-visible-height,100dvh) - 110px)}
dialog{box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);overflow:auto;overscroll-behavior:contain}dialog input,dialog select,dialog textarea{max-width:100%}dialog::backdrop{background:rgba(10,28,39,.7)}
@media(pointer:coarse){button,.btn,summary,.cn-menu-links a{min-height:44px;touch-action:manipulation}.markup-pin{width:44px;height:44px}input[type=checkbox],input[type=radio]{min-width:22px;min-height:22px}.cn-help-topic{min-height:44px}}
@media(max-width:700px){
 body{padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
 .wrap{width:calc(100% - 32px);max-width:100%;margin-left:auto;margin-right:auto}
 .header-inner{gap:12px;flex-wrap:wrap}.brand-copy{min-width:0}.brand-copy strong{overflow-wrap:anywhere}
 .header-inner .btn{white-space:normal;max-width:100%}.cn-menu-links{grid-template-columns:repeat(2,minmax(0,1fr))}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important;min-width:0}
 .form-grid,.hub-form-grid,.hub-layout aside,.v5-columns{grid-template-columns:minmax(0,1fr)}
 .form-grid .wide,.hub-full{grid-column:1/-1}
 .v5-controls input,.v5-controls select,.completed-controls label{min-width:0;width:100%;max-width:100%}
 .v5-panel,.panel,.completed-case-body{overflow-wrap:anywhere}
 .cn-help-panel{left:12px;right:12px;width:auto}.cn-help-launch{right:12px;padding:12px;font-size:13px}
 .cn-session-countdown{left:12px!important;font-size:12px;padding:10px!important}
 .cn-help-form{position:sticky;bottom:0;background:inherit}.cn-app-access{margin-left:0;width:100%}
 .cn-app-access:not([open]){width:auto}.cn-app-instructions{max-width:100%}
 h1{overflow-wrap:break-word}.case-team{grid-template-columns:1fr}.case-costs strong{font-size:20px}
}
@media(max-width:380px){.cn-menu-links{grid-template-columns:1fr}.header-inner .brand{gap:8px}.wrap{width:calc(100% - 24px)}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
@supports not (backdrop-filter:blur(8px)){.site-header{background:#fffdf7}html[data-theme=dark] .site-header{background:#102b3b}}
html[data-theme=dark] .cn-app-instructions{background:#102b3b;color:#edf7f7}


/* Phone input, keyboard, notch and narrow-screen refinements. */
@media(max-width:700px){
 .cn-unified-header .header-inner{gap:10px!important;padding:12px!important;min-height:72px!important}
 .cn-unified-header .brand{flex:1 1 180px!important}.cn-unified-header .nav-right{gap:8px!important}
 .cn-app-access summary{font-size:13px;padding:10px;min-height:44px}
 .cn-app-access{position:relative}.cn-app-instructions{position:absolute;right:0;top:100%;width:min(340px,calc(100vw - 32px));z-index:80;box-shadow:0 12px 30px #183b4633}
 .cn-primary-links>a{flex:1;justify-content:center;text-align:center;min-width:0;overflow-wrap:anywhere}
 .cn-project-dialog[open]{top:calc(var(--cn-visible-top,0px) + 8px)!important;inset-inline:0!important;width:calc(100% - 16px)!important;max-width:620px!important;max-height:calc(var(--cn-visible-height,100dvh) - 16px)!important;margin-inline:auto!important;padding:20px 16px!important;padding-bottom:max(20px,env(safe-area-inset-bottom))!important;scroll-padding:20px}
 .cn-project-dialog .project-wizard-nav{position:sticky;bottom:-1px;padding:12px 0 max(8px,env(safe-area-inset-bottom));background:var(--cn-dialog-bg,#eaf3ed);z-index:2}
 .cn-project-dialog h2{font-size:clamp(1.45rem,6vw,1.9rem);line-height:1.2}
 input,select,textarea{scroll-margin-block:24px;min-height:44px}
 .home-grid{grid-template-columns:minmax(0,1fr)}.home-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .home-actions>a,.home-row>a{min-height:44px;display:inline-flex;align-items:center}
 .home-panel,.team-card,.tool-record{min-width:0;overflow-wrap:anywhere}
 input[type=file]::file-selector-button{min-height:44px;white-space:normal;max-width:100%}
}
@media(max-width:380px){.cn-unified-header .brand-copy strong{font-size:11px!important;letter-spacing:.12em!important}.cn-unified-header .nav-right{width:100%;justify-content:flex-end}}
@media(display-mode:standalone){body{padding-top:env(safe-area-inset-top,0px)}.cn-app-access{display:none!important}}
