/* ICT: screen-only enhancement. Print/PDF layouts and functional controls stay unchanged. */
@media screen {
  body.cx-magnetic {--cx-dock-purple:#7745be;--cx-dock-soft:#f1edfa}
  .cx-magnetic-dock {box-sizing:border-box;display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;gap:16px 12px;max-width:1420px;margin:10px auto 26px;padding:25px 22px 18px;border:1px solid #e5e8f1;border-radius:24px;background:#fff;box-shadow:0 16px 32px #142b4b26;font-family:Arial,Helvetica,sans-serif;position:relative;z-index:5}
  body>.cx-magnetic-dock {width:calc(100% - 40px)}
  .cx-magnetic-dock a {flex:1 1 90px;max-width:150px;min-height:88px;display:flex;flex-direction:column;align-items:center;gap:14px;text-decoration:none;color:#17233e;font-size:12px;line-height:1.35;font-weight:700;text-align:center;padding:0 3px 3px;border-radius:12px}
  .cx-dock-icon {display:grid;place-items:center;flex:0 0 auto;width:54px;height:54px;border-radius:16px;background:#f1edfa;color:#7745be;transform-origin:bottom;transition:transform 180ms ease,background 180ms ease;transform:translateY(var(--magnet-y,0px)) scale(var(--magnet-scale,1))}
  .cx-dock-icon svg {width:25px;height:25px}
  .cx-magnetic-dock a:hover .cx-dock-icon,.cx-magnetic-dock a:focus-visible .cx-dock-icon {background:#7745be;color:#fff;transform:translateY(-8px) scale(1.24)}
  .cx-magnetic-dock a[aria-current=page] .cx-dock-icon {background:#0063a8;color:#fff}
  .cx-magnetic-dock a:focus-visible {outline:3px solid #00a8dc;outline-offset:5px}
  .cx-magnetic-welcome {color:#fff;padding:12px 4px 24px}
  .cx-magnetic-welcome h1 {font-size:clamp(26px,3.2vw,40px);line-height:1.15;margin:0 0 14px;letter-spacing:-.7px;color:#fff}
  .cx-magnetic-welcome p {font-size:16px;line-height:1.6;margin:0;color:#e5edff}
  .cx-magnetic.cx-portal #cards {display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;background:#fff;border-radius:24px;padding:24px}
  .cx-magnetic.cx-portal #cards .card {min-height:165px;padding:16px 12px;background:#fff!important;color:#17233e!important;border:0!important;box-shadow:none!important;text-align:center;transform:none!important;border-radius:16px}
  .cx-magnetic.cx-portal #cards .card::after {display:none}
  .cx-magnetic.cx-portal #cards .card-top {display:flex;flex-direction:column;align-items:center;gap:16px}
  .cx-magnetic.cx-portal #cards .card-icon,.cx-magnetic.cx-portal #services .icon {background:#f1edfa;color:#7745be;width:54px;height:54px;border-radius:16px;display:grid;place-items:center;font-size:25px;transform-origin:bottom;transition:transform 180ms ease,background 180ms ease;transform:translateY(var(--magnet-y,0px)) scale(var(--magnet-scale,1))}
  .cx-magnetic.cx-portal #cards .card:hover .card-icon,.cx-magnetic.cx-portal #cards .card:focus-visible .card-icon {transform:translateY(-7px) scale(1.2);background:#e2d6f5}
  .cx-magnetic.cx-portal #cards .card h3 {font-size:16px;line-height:1.4;color:#17233e}
  .cx-magnetic.cx-portal #cards .card p {font-size:13px;line-height:1.5;font-weight:400;color:#52617b!important;margin-top:12px}
  .cx-magnetic.cx-portal #cards .card:focus-visible {outline:3px solid #00a8dc;outline-offset:3px}
  .cx-magnetic.cx-portal #services {grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:12px}
  .cx-magnetic.cx-portal #services .service-button {background:#fff!important;color:#17233e!important;box-shadow:none!important;border:1px solid #e4e8f2!important;filter:none!important;transform:none!important;padding:18px 10px;gap:14px}
  .cx-magnetic.cx-portal #services .service-button[aria-pressed=true] {border:2px solid #0063a8!important;background:#f5f9ff!important}
  .cx-magnetic.cx-portal #services .service-subtitle {color:#52617b;font-weight:400}
  .cx-magnetic .cx-compact-products {min-height:100px}
  @media(max-width:650px){.cx-magnetic-dock{gap:20px 8px;padding:23px 12px 16px;border-radius:20px}.cx-magnetic-dock a{flex-basis:26%;max-width:none;font-size:12px}.cx-dock-icon{width:48px;height:48px}body>.cx-magnetic-dock{width:calc(100% - 24px)}.cx-magnetic.cx-portal #cards{grid-template-columns:repeat(auto-fit,minmax(135px,1fr));padding:14px;gap:8px}.cx-magnetic.cx-portal #cards .card{padding:12px 6px}}
  @media(prefers-reduced-motion:reduce){.cx-magnetic .cx-dock-icon,.cx-magnetic.cx-portal #cards .card-icon,.cx-magnetic.cx-portal #services .icon{transition:none!important;transform:none!important}}
}
@media print {.cx-magnetic-dock,.cx-magnetic-welcome{display:none!important}}
body.pdf-export .cx-magnetic-dock,body.pdf-exporting .cx-magnetic-dock,body.pdf-export .cx-magnetic-welcome,body.pdf-exporting .cx-magnetic-welcome{display:none!important}
/* ServicePocket keeps its own fixed sidebar; reserve the same width for the dock. */
@media screen and (min-width:651px){body.cx-pocket>.cx-magnetic-dock{margin-left:268px;margin-right:20px;width:calc(100% - 288px)}}
@media screen and (min-width:651px) and (max-width:1150px){body.cx-pocket>.cx-magnetic-dock{margin-left:238px;width:calc(100% - 258px)}}
@media screen and (min-width:651px) and (max-width:900px){body.cx-pocket>.cx-magnetic-dock{margin-left:215px;width:calc(100% - 235px)}}
@media screen {
 .cx-magnetic.cx-home .services {background:#fff;border-radius:24px;padding:24px;gap:16px;display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}
 .cx-magnetic.cx-home .services .service {text-align:center;background:#fff!important;border:0!important;box-shadow:none!important;border-radius:16px;padding:16px 10px;min-height:170px;align-items:center;transform:none!important}
 .cx-magnetic.cx-home .services .service-icon {display:grid!important;place-items:center;width:54px;height:54px;background:#f1edfa;color:#7745be;border-radius:16px;margin:0 auto 14px;transform-origin:bottom;transition:transform 180ms ease;transform:translateY(var(--magnet-y,0px)) scale(var(--magnet-scale,1))}
 .cx-magnetic.cx-home .service-icon svg {width:25px;height:25px}
 .cx-magnetic.cx-home .services .arrow {display:none}
 .cx-magnetic.cx-home .services .service strong {font-size:16px;line-height:1.4;margin-bottom:9px}
 .cx-magnetic.cx-home .services .service>span:not(.service-icon):not(.arrow) {font-size:13px;line-height:1.5}
 .cx-magnetic.cx-home .services .service:focus-visible {outline:3px solid #00a8dc;outline-offset:3px}
 @media(prefers-reduced-motion:reduce){.cx-magnetic.cx-home .services .service-icon{transition:none!important;transform:none!important}}
}
/* Prevent long settings tables from forcing the mobile grid beyond the viewport. */
@media screen {.cx-magnetic .settings-grid>.panel{min-width:0}.cx-magnetic .settings-grid .asset-row>*{min-width:0;overflow-wrap:anywhere}}

/* Safari: explicit hover/focus response, also before login and over labels.
   JS supplies resolved units rather than arithmetic inside CSS transforms. */
@media screen and (prefers-reduced-motion:no-preference) {
 .cx-magnetic.cx-home .services .service:hover .service-icon,
 .cx-magnetic.cx-home .services .service:focus-visible .service-icon,
 .cx-magnetic.cx-portal #services .service-button:hover .icon,
 .cx-magnetic.cx-portal #services .service-button:focus-visible .icon {
   background:#7745be;color:#fff;transform:translateY(-9px) scale(1.26);
 }
 .cx-magnetic.cx-home .services .service-icon {transition:transform 240ms cubic-bezier(.2,.8,.2,1),background 180ms,color 180ms}
}
/* Only the icons move: no brightness/white glow on pointer hover. */
@media screen {
 .cx-magnetic.cx-home .services .service,
 .cx-magnetic.cx-home .services .service:hover,
 .cx-magnetic.cx-home .services .service:focus-visible,
 .cx-magnetic.cx-portal #cards .card,
 .cx-magnetic.cx-portal #cards .card:hover,
 .cx-magnetic .cx-magnetic-dock a,
 .cx-magnetic .cx-magnetic-dock a:hover {filter:none!important;box-shadow:none!important}
}

/* ICT: legacy desktop workspaces locked html/body to the viewport. The shared
   header and dock are in addition to that workspace; keep the document scrollable.
   Internal PDF/list scrolling remains intact. Scope to these two workspaces. */
@media screen {
 html:has(body.cx-magnetic .pdf-canvas-viewer),
 html:has(body.cx-magnetic #chatHead) {height:auto!important;overflow-y:auto!important}
 body.cx-magnetic:has(.pdf-canvas-viewer),
 body.cx-magnetic:has(#chatHead) {height:auto!important;min-height:100vh;overflow:visible!important}
}
@media screen and (min-width:901px) {
 body.cx-magnetic:has(.pdf-canvas-viewer)>.shell {
   height:max(640px,calc(100dvh - var(--cx-head,220px) - 210px));
 }
}
@media screen and (min-width:851px) {
 body.cx-magnetic:has(#chatHead)>.shell {
   height:max(800px,calc(100dvh - var(--cx-head,220px) - 210px));
 }
 body.cx-magnetic:has(#chatHead) .grid>.panel:last-child {overflow-y:auto}
}

/* ICT: mobile working area. Screen only; original controls/print exports retained. */
#cxMobileTools{display:none}
@media screen and (max-width:1000px){
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting){padding-top:calc(52px + env(safe-area-inset-top))!important;--cx-head:52px!important;scroll-padding-top:60px}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting) #cxMobileTools{display:flex;position:fixed;top:0;left:0;right:0;height:calc(52px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 8px 0;gap:8px;align-items:center;background:#fff;border-bottom:2px solid #7745be;z-index:10020;box-sizing:border-box}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting) #cxMobileTools>a,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting) #cxMobileTools>button{display:flex;align-items:center;justify-content:center;flex:1;min-height:42px;padding:6px 10px!important;font:700 14px Arial!important;text-decoration:none;background:#f1edfa!important;color:#24345b!important;border:0!important;border-radius:8px!important;box-shadow:none!important}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting) #cairoxUniformHeader,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting)>#cairoxMagneticDock{display:none!important}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-menu-open #cairoxUniformHeader{display:block!important;position:static!important;width:100%!important}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-menu-open>#cairoxMagneticDock{display:flex!important;margin:8px;width:calc(100% - 16px);padding:16px 8px}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting) #cairoxUniformHeader .cx-compact-products{display:none!important}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting) .cx-mobile-original-actions{display:none!important}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-actions-open .cx-mobile-original-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));position:fixed!important;top:calc(52px + env(safe-area-inset-top));left:0;right:0;bottom:auto!important;width:100%!important;max-width:none!important;max-height:60dvh;overflow:auto;z-index:10010;margin:0!important;padding:12px!important;gap:8px;background:#fff!important;border-bottom:2px solid #7745be;box-sizing:border-box;box-shadow:0 10px 24px #10234a33}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting) .cx-mobile-original-actions>button,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting) .cx-mobile-original-actions>a{display:flex!important;align-items:center;justify-content:center;min-width:0;min-height:44px;font-size:13px!important;padding:10px!important;white-space:normal;text-align:center;background:#0062a4!important;color:#fff!important;border:0!important;border-radius:8px!important}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting) .cx-keep-actions,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting) .cx-keep-actions .topbar-inner{margin:0!important;padding:0!important;border:0!important;min-height:0!important}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report .wrapper,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report .wrap,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report .layout{width:100%!important;max-width:none!important;margin:0!important;padding:6px!important;box-sizing:border-box}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report .layout{grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report .sidebar{display:none}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report.cx-mobile-menu-open .sidebar{display:block;position:static}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report .page{width:100%!important;min-height:0!important;margin:0 0 10px!important;padding:12px!important;box-sizing:border-box}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report .card,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report .section-body,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report .section-head,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report .intro{padding:14px!important}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report input:not([type=checkbox]):not([type=radio]),body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report select,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report textarea{font-size:16px!important;max-width:100%;min-width:0}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report .intro h2,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report .intro #headerStatus{color:#fff!important}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report label{min-width:0;overflow-wrap:anywhere}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report input[type=file]{width:100%}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-report [id]{scroll-margin-top:65px}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf .intro-grid,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf .installer-fields,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf .split-tables,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf .rb-grid,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf .footer-signatures{grid-template-columns:minmax(0,1fr)!important;gap:10px;font-size:16px}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf .flex{flex-direction:column;gap:10px}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf .emails{flex-wrap:wrap;gap:8px;margin:8px 0;font-size:14px;overflow-wrap:anywhere}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf h1.title{font-size:25px}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf .section-title,body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf .u-blue{font-size:22px}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf .checkbox-line{font-size:16px;flex-wrap:wrap}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf .cx-mobile-wide-table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf .cx-mobile-wide-table>tbody{display:table;min-width:560px;width:100%}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf .dip-grid-wrap{gap:12px}
 body.cx-mobile-work:not(.pdf-export):not(.pdf-exporting).cx-mobile-vrf .dip-group{flex-wrap:wrap;gap:8px}
}
@media print{#cxMobileTools{display:none!important}}
body.pdf-export #cxMobileTools,body.pdf-exporting #cxMobileTools{display:none!important}
/* Mobile home: header and promotions scroll with the page, freeing the viewport. */
@media screen and (max-width:1000px){
 html body.cx-unified.cx-magnetic:is(.cx-home,.cx-portal){padding-top:0!important;--cx-head:0px!important;height:auto!important;min-height:100dvh;overflow-y:auto!important}
 body:is(.cx-home,.cx-portal) #cairoxUniformHeader{position:relative!important;top:auto!important}
 body:is(.cx-home,.cx-portal) .cx-head-row{padding:8px 12px!important;gap:8px!important}
 body:is(.cx-home,.cx-portal) .cx-page-title{font-size:16px!important}
 body.cx-portal .shell{margin-top:12px;padding:0 10px}
 body.cx-portal #services{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 body.cx-portal #services .service-button{min-height:76px!important;width:100%!important;max-width:none!important;padding:10px 6px!important;gap:6px!important;font-size:13px!important;flex-direction:column!important}
 body.cx-portal #services .icon{width:34px!important;height:34px!important;border-radius:10px;font-size:20px}
 body.cx-portal #services .service-subtitle{display:none}
 body.cx-portal .service-panel{padding:12px}
 body.cx-portal .content-head{margin:18px 4px 10px}
 body.cx-portal .cx-magnetic-welcome{padding:14px 16px!important;margin:0!important}
 body.cx-portal .cx-magnetic-welcome h1{font-size:22px!important;margin:0 0 8px!important}
 body.cx-portal .cx-magnetic-welcome p{font-size:14px!important;margin:0!important}
 body.cx-portal #cairoxMagneticDock{padding:12px 8px!important;gap:10px 8px!important;margin:10px!important;width:calc(100% - 20px)!important}
 body.cx-portal #cairoxMagneticDock a{gap:6px!important;font-size:11px!important;padding:4px!important}
 body.cx-portal #cairoxMagneticDock .cx-dock-icon{width:36px!important;height:36px!important;border-radius:10px!important}
}
