/* v5.7.3 mobile-first polish. Locally hosted, no Bootstrap CDN/runtime dependency.
   Uses Bootstrap 5's familiar xs/sm/md/lg/xl breakpoint model.
   Always loaded last to override legacy v4-v5.7 editor layout patches. */
.hm-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.hm-lang-wrap{min-width:0;display:flex;align-items:center;gap:6px;flex-shrink:0;color:#244778}
.hm-lang-label{font-size:14px;white-space:nowrap;font-weight:700;cursor:pointer}
.hm-lang-select{appearance:auto;min-width:102px;max-width:135px;min-height:41px;padding:7px 8px;border:1px solid #cbd9f5;background:#fff;border-radius:11px;color:#263b6b;font:600 14px/1.25 system-ui,-apple-system,'Segoe UI',sans-serif;cursor:pointer}
.hm-lang-select:focus-visible,.hm-mobile-toggle:focus-visible{outline:3px solid #357cfd;outline-offset:2px}
.hm-mobile-toggle{display:none;border:1px solid #cadbf8;border-radius:10px;min-height:43px;padding:9px 12px;background:white;color:#2754a1;font:700 14px system-ui,-apple-system,sans-serif;cursor:pointer;align-items:center;justify-content:center;gap:6px}
.hm-menu-bars{font-size:20px;line-height:1}
.header-in>.hm-lang-wrap{margin-left:auto}
/* Forms: all PDF, OCR, image, compression and text utility controls stay within their panels. */
:where(.pc-section,.pc-workspace,.compression-main,.editor-shell,.bt-main,.simple-main,.tool-mini,.catalog-section,.hm-directory) :is(input:not([type=radio]):not([type=checkbox]):not([type=color]),select,textarea){max-width:100%;min-width:0;box-sizing:border-box}
:where(.pc-section,.pc-workspace,.compression-main,.editor-shell,.bt-main,.simple-main,.tool-mini,.catalog-section,.hm-directory) :is(button,.btn,.action-btn){max-width:100%;box-sizing:border-box}
:where(.hm-main,.pc-section,.pc-workspace,.editor-shell,.bt-main,.simple-main,.tool-mini,.catalog-section,.hm-directory){min-width:0}
:where(.pc-ocr-rows,.pc-toolbar,.pc-viewer-bar,.pc-viewer-tools,.pc-sign-actions,.pc-sign-choices,.pc-export,.pc-options,.compress-controls,.hm-directory-top){min-width:0}
/* Heading and tap-target readability */
.hm-nav>a,.hm-all-menu>summary,.hm-lang-select{font-size:15px}
@media(max-width:1199.98px){.hm-head-inner{gap:10px}.hm-head-right{gap:8px}.hm-privacy-chip{display:none!important}.hm-nav>a,.hm-all-menu>summary{padding:10px 8px}.hm-mega-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Bootstrap lg and lower: collapse the navigation rather than placing all links in a horizontally scrolling row. */
@media(max-width:1099.98px){
 .hm-header{height:auto!important;min-height:66px!important;position:relative}
 .hm-head-inner{min-height:66px!important;height:auto!important;display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important;padding:9px 14px!important}
 /* The editor-specific v5.6 header height was !important: override it at tablet widths too. */
 .hm-editor-route .hm-head-inner{height:auto!important;min-height:66px!important;flex-wrap:wrap!important}
 .hm-mobile-toggle{display:inline-flex!important;order:3}
 .hm-head-right{order:2;margin-left:auto!important;display:flex!important;align-items:center!important;flex:0 1 auto}
 .hm-head-inner>.hm-nav{display:none!important;flex-basis:100%!important;order:5!important;width:100%!important;height:auto!important;overflow:visible!important;padding:10px 0 5px!important;margin:0!important;flex-direction:column!important;align-items:stretch!important;gap:3px!important;white-space:normal!important;border-top:1px solid #d7e2f6}
 .hm-header.hm-mobile-open .hm-head-inner>.hm-nav{display:flex!important}
 .hm-nav>a,.hm-all-menu>summary{display:block!important;padding:12px 13px!important;margin:0!important;font-size:16px!important;line-height:1.4!important;white-space:normal!important;width:100%!important;min-height:44px!important;box-sizing:border-box!important}
 .hm-all-menu{width:100%!important;position:static!important}
 .hm-all-menu summary{cursor:pointer}
 .hm-mega{position:static!important;top:auto!important;left:auto!important;right:auto!important;width:100%!important;box-sizing:border-box!important;border:1px solid #dce7fa!important;border-radius:14px!important;box-shadow:none!important;margin:4px 0 8px!important;max-height:55dvh!important;overflow-y:auto!important;overflow-x:hidden!important;padding:16px!important}
 .hm-mega-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:17px!important}
 .mega-items a{font-size:14px!important;min-height:39px!important;line-height:1.3!important}
 .mega-group h3{font-size:14px!important}
 .hm-editor-route .hm-head-inner{gap:8px!important}
 .hm-editor-route .hm-nav{width:100%!important;margin:0!important;order:5!important;overflow:visible!important;flex-wrap:nowrap!important}
 .header-in{display:flex;flex-wrap:wrap;gap:8px;align-items:center;min-height:68px;height:auto;padding:10px 14px}
 .header-in>.hm-mobile-toggle{display:inline-flex;order:3}
 .header-in>.hm-lang-wrap{margin-left:auto;order:2}
 .header-in>.desktop-nav{display:none;order:5;flex-basis:100%;width:100%;flex-direction:column;align-items:stretch;gap:2px;padding:9px 0;border-top:1px solid #dce5f5}
 .header.hm-mobile-open .desktop-nav{display:flex!important}
 .header-in>.desktop-nav>a{display:block;padding:13px;min-height:44px;font-size:16px;border-radius:10px}
 .header-in>.header-cta{display:none}
}
@media(max-width:767.98px){
 .hm-head-inner{padding:9px 12px!important;gap:7px!important}
 .hm-brand{font-size:21px!important;gap:6px!important}
 .hm-brandmark{width:33px!important;height:33px!important}
 .hm-head-right .hm-cta{display:none!important}
 .hm-lang-caption{display:none}
 .hm-lang-select{min-width:92px;max-width:112px;min-height:44px;padding:7px 4px;font-size:14px}
 .hm-mobile-toggle{padding:8px 10px;min-width:43px;min-height:44px}
 .hm-menu-txt{display:none}
 .hm-mega-grid{grid-template-columns:1fr!important;gap:13px!important}
 .hm-mega-top{flex-wrap:wrap!important;gap:8px!important}
 .hm-mega-top a{font-size:14px!important}
 .hm-mega{max-height:58dvh!important;padding:12px!important}
 .hm-main{width:calc(100% - 24px)!important}
 .hm-card-grid,.hm-directory-group .hm-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 .hm-card{min-width:0!important;padding:14px 12px!important;min-height:130px!important}
 .hm-card strong{font-size:15px!important}
 .hm-card>span:last-child{font-size:13px!important;line-height:1.4!important}
 .hm-category-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .hm-category{min-width:0!important;flex-wrap:wrap!important}
 .hm-category strong{font-size:14px!important}
 .hm-home-hero{min-width:0;grid-template-columns:1fr!important}
 .hm-hero-copy h1{font-size:clamp(34px,8.6vw,48px)!important;line-height:1.12!important}
 .hm-hero-copy>p{font-size:16px!important;line-height:1.6!important}
 .hm-hero-actions{display:flex;flex-wrap:wrap;gap:10px}
 .hm-hero-actions a{min-height:44px;display:inline-flex;align-items:center}
 .hm-directory-top{display:block!important}
 .hm-directory-top h1{font-size:clamp(28px,6vw,37px)!important}
 .hm-tool-search,#hm-filter{width:100%!important;max-width:100%!important;min-width:0!important}
 /* Each editor input/action row can wrap. Don't compress fields to unreadable sizes. */
 .pc-workspace{padding:10px!important}
 .pc-toolbar{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:8px!important;padding:10px!important}
 .pc-toolbar :is(button,.btn,.action-btn){min-height:44px!important;font-size:14px!important;white-space:normal!important}
 .pc-toolbar .pc-export{flex:1 1 100%!important;margin:0!important;min-width:0!important}
 .pc-toolbar .pc-export :is(button,.btn){width:100%!important}
 .pc-v5-layout{grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
 .pc-tools{display:flex!important;overflow-x:auto!important;max-width:100%!important;flex-wrap:nowrap!important;gap:7px!important;padding-bottom:5px!important}
 .pc-tool{font-size:14px!important;min-height:44px!important;white-space:nowrap!important;flex:0 0 auto!important;padding:9px 11px!important}
 .pc-viewer-bar{display:flex!important;flex-wrap:wrap!important;gap:8px!important;padding:10px!important}
 .pc-v5-jump{width:100%!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;order:2!important}
 .pc-v5-jump input{max-width:90px!important}
 .pc-viewer-tools{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important;padding:10px!important}
 .pc-viewer-tools label{font-size:14px!important;min-height:38px!important}
 .pc-viewer-tools input[type=text]{width:min(220px,65vw)!important;max-width:100%!important;font-size:16px!important}
 .pc-viewer-tools input[type=number]{width:76px!important;max-width:110px!important;font-size:16px!important}
 .pc-viewer-tools #pc-viewer-status{display:block!important;flex:1 1 100%!important;min-width:0!important;font-size:13px!important}
 .pc-v5-settings,.pc-v52-thumbs{min-width:0!important;max-width:100%!important;width:100%!important;box-sizing:border-box!important}
 .pc-v5-settings input:not([type=checkbox]):not([type=radio]):not([type=color]),.pc-v5-settings select,.pc-v5-settings textarea{max-width:100%!important;box-sizing:border-box!important;font-size:16px!important}
 .pc-v5-settings .pc-sign-draw canvas{width:100%!important;max-width:100%!important;height:235px!important;touch-action:none!important}
 .pc-v5-settings .pc-sign-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
 .pc-v5-settings .pc-sign-actions button{min-height:44px!important;font-size:14px!important}
 .pc-v52-thumbs .pc-grid{overflow-x:auto!important;overflow-y:hidden!important;max-width:100%!important}
 .pc-v52-thumbs .pc-tile{flex:0 0 170px!important}
 .pc-v5-docked .pc-viewer-card{height:64dvh!important;min-height:430px!important;max-width:100%!important}
 /* Native inputs never overflow and never trigger iOS auto-zoom */
 :where(main,.pc-workspace,.pc-section,.editor-shell,.simple-panel,.tool-mini,.bt-main) :is(input:not([type=checkbox]):not([type=radio]):not([type=color]),select,textarea){font-size:16px!important;max-width:100%!important}
 .bt-layout,.bt-field-row{grid-template-columns:minmax(0,1fr)!important}
 .bt-studio{padding:14px!important}
 .bt-options{min-width:0!important}
 .bt-options .bt-field{display:flex;flex-wrap:wrap}
 .bt-options .bt-field label{min-width:0!important;flex:1 1 100%!important}
 .simple-grid{grid-template-columns:1fr!important}
 .simple-panel{padding:15px!important}
 .pc-ocr-rows{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:11px!important}
 .pc-ocr-rows input,.pc-ocr-rows select,.pc-ocr-rows button{width:100%!important;max-width:100%!important;min-height:44px!important}
 .pc-ocr{padding:15px!important;min-width:0!important}
 .pc-ocr textarea{width:100%!important;min-width:0!important}
 .footer-top{grid-template-columns:1fr!important;gap:18px!important}
 .footer-top>div:first-child{grid-column:auto!important}
 .footer-top p,.footer-top a,.foot-bottom,.foot-bottom a{font-size:15px!important;line-height:1.65!important}
}
@media(max-width:419.98px){
 .hm-brand{font-size:18px!important}
 .hm-brandmark{width:29px!important;height:29px!important;font-size:20px!important}
 .hm-lang-select{min-width:78px;max-width:94px;font-size:13px}
 .hm-head-inner{gap:6px!important;padding:8px 9px!important}
 .hm-mobile-toggle{min-width:40px;min-height:42px;padding:7px!important}
 .hm-card-grid,.hm-directory-group .hm-card-grid{grid-template-columns:1fr 1fr!important;gap:8px!important}
 .hm-card strong{font-size:14px!important}
 .hm-card>span:last-child{font-size:12px!important}
 .hm-category-cards{grid-template-columns:1fr!important}
 .hm-category strong{font-size:15px!important}
 .hm-v5-benefits{grid-template-columns:1fr!important}
 .pc-toolbar :is(button,.btn,.action-btn){min-height:43px!important}
 .header-in{padding:10px!important;gap:6px}
 .header-in .brand{font-size:18px!important}
}
@media(prefers-reduced-motion:reduce){.hm-nav,.hm-mega{scroll-behavior:auto!important}}
@media(max-width:359.98px){
 .hm-head-inner{padding:8px!important;gap:4px!important}
 .hm-brand{font-size:17px!important}
 .hm-brandmark{width:26px!important;height:26px!important}
 .hm-lang-label{display:none!important}
 .hm-lang-select{min-width:76px;max-width:86px;padding:6px 2px;font-size:12px}
 .hm-mobile-toggle{min-width:38px;padding:5px!important}
}
