/* ---------- targeted fixes for design components on small screens ---------- */
@media (max-width:767px){
  .fx-announce{height:auto!important;min-height:44px;padding:10px 44px!important;justify-content:center!important;flex-wrap:wrap;text-align:center;gap:4px 8px!important;font-size:13px!important;line-height:1.4;box-sizing:border-box}
  .fx-announce>button{top:50%!important;transform:translateY(-50%)}
}
@media (max-width:767px){
  .fx-logos{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .fx-logos>*{min-height:64px!important;height:auto!important;padding:10px!important}
  .fx-formcard{order:-1;margin-top:0!important;padding:24px 20px!important}
}
/* home: the designed phone layout is also used on tablets. Bands, rules and the nav run full width,
   the content sits in a centred 680px column. */
@media (min-width:768px){
  .fx-mc{padding-left:max(40px,calc((100% - 680px) / 2))!important;padding-right:max(40px,calc((100% - 680px) / 2))!important}
  .fx-mcm{margin-left:max(40px,calc((100% - 680px) / 2))!important;margin-right:max(40px,calc((100% - 680px) / 2))!important}
}

/* ---------- wider than the 1440px canvas ---------- */
@media (min-width:1441px){
  /* nav, announcement and header/footer bars: full-width background, contents where the 1440px design has them */
  .fx-bar32{padding-left:calc(32px + (100% - 1440px) / 2)!important;padding-right:calc(32px + (100% - 1440px) / 2)!important}
  .fx-bar48{padding-left:calc(48px + (100% - 1440px) / 2)!important;padding-right:calc(48px + (100% - 1440px) / 2)!important}
  .fx-annx{right:calc(16px + (100% - 1440px) / 2)!important}
  /* home hero: floating cards stay pinned to the centred truck photo */
  .fx-heroflt{margin-left:calc((100% - 1440px) / 2)!important}
  .fx-heroimg{-webkit-mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent)}
  /* split heroes: the photo or panel bleeds to the right edge, the copy keeps the page column */
  .fx-split600{grid-template-columns:minmax(0,1fr) calc(600px + (100% - 1440px) / 2)!important}
  .fx-split560{grid-template-columns:minmax(0,1fr) calc(560px + (100% - 1440px) / 2)!important}
  .fx-split640{grid-template-columns:minmax(0,1fr) calc(640px + (100% - 1440px) / 2)!important}
  .fx-splitl600{padding-left:max(120px,calc(100% - 720px))!important}
  .fx-splitl560{padding-left:max(120px,calc(100% - 760px))!important}
  .fx-splitl640{padding-left:max(120px,calc(100% - 680px))!important}
  .fx-splitr640{padding-right:max(64px,calc(100% - 576px))!important}
}

/* sticky header rows inside rounded table frames: clip without creating a scroll box */
.fx-clip{overflow:clip!important}

/* ---------- tablets and phones ---------- */
@media (max-width:1099px){
  /* compare: one block per row, every value labelled with its column */
  .fx-cmp-head{display:none!important}
  .fx-cmp-row.fx-cmp-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .fx-cmp-row>:first-child{grid-column:1/-1;padding:18px 20px 6px!important;color:#7AC943!important}
  .fx-cmp-row>[data-col]{border-left:0!important;border-top:1px solid #1F2B1B;padding:16px 20px!important}
  .fx-cmp-row>[data-col]:nth-child(2){grid-column:1/-1}
  .fx-cmp-row>[data-col]:nth-child(2n+4){border-left:1px solid #1F2B1B!important}
  .fx-cmp-row>[data-col]::before{content:attr(data-col);display:block;margin-bottom:6px;font-family:'DM Mono',monospace;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:#5E6B58}
  .fx-cmp-row>[data-col]:nth-child(2)::before{color:#C6F000}

  /* pricing matrix keeps its four columns on tablets */
  .fx-pr-head.fx-pr-head,.fx-pr-row.fx-pr-row{grid-template-columns:minmax(0,1.4fr) repeat(3,minmax(0,1fr))!important}
  .fx-pr-row>*{padding-left:20px!important;padding-right:20px!important}
  .fx-pr-head>*{padding-left:16px!important;padding-right:16px!important}
  .fx-pr-head a{display:none!important}

  /* glossary */
  .fx-glbar{flex-direction:column!important;align-items:stretch!important;gap:10px!important;padding-top:10px!important;padding-bottom:10px!important}
  .fx-glletters.fx-glletters{flex:none!important;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .fx-glletters::-webkit-scrollbar{display:none}
  .fx-glletters>a{flex:0 0 34px!important}
  .fx-glbar>input{width:100%!important;box-sizing:border-box}
  .fx-glgroup.fx-glgroup{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}

  /* careers: title on top, team and location underneath, arrow on the right */
  .fx-role.fx-role{grid-template-columns:auto auto minmax(0,1fr) 24px!important;gap:10px 18px!important;padding:20px 4px!important}
  .fx-role>:nth-child(1){grid-column:1/4}
  .fx-role>:nth-child(4){grid-column:4;grid-row:1/3;align-self:center}

  .fx-ctain{padding-left:40px;padding-right:40px}
  .fx-shot{margin-left:40px!important;margin-right:40px!important}
}
@media (max-width:767px){
  .fx-cmp-row.fx-cmp-row{grid-template-columns:minmax(0,1fr)!important}
  .fx-cmp-row>[data-col]:nth-child(2n+4){border-left:0!important}

  /* pricing: tier names over three value columns; the briefing buttons already sit on each tier card */
  .fx-pr-head.fx-pr-head,.fx-pr-row.fx-pr-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .fx-pr-head>:first-child,.fx-pr-row>:first-child{grid-column:1/-1;padding:16px 16px 4px!important}
  .fx-pr-head>:first-child{padding-top:18px!important}
  .fx-pr-head>:not(:first-child){padding:6px 8px 12px 16px!important;border-left:0!important}
  .fx-pr-head a{display:none!important}
  .fx-pr-row>:first-child{padding-bottom:2px!important}
  .fx-pr-row>:not(:first-child){padding:8px 8px 14px 16px!important;border-left:0!important;min-height:0!important}

  /* LSP44 and project44: one row per topic, each answer labelled */
  .fx-p44-head{display:none!important}
  .fx-p44-row>:first-child{padding:20px 20px 4px!important}
  .fx-p44-a,.fx-p44-b,.fx-p44-s{border-left:0!important;padding:12px 20px 18px!important;font-size:16px!important}
  .fx-p44-a::before,.fx-p44-b::before{display:block;margin-bottom:6px;font-family:'DM Mono',monospace;font-size:10px;letter-spacing:.14em;color:#5E6B58}
  .fx-p44-a::before{content:'LSP44';color:#C6F000}
  .fx-p44-b::before{content:'PROJECT44'}
  .fx-p44-b{border-top:1px solid #1F2B1B}

  .fx-ctain{padding-left:20px;padding-right:20px}
  .fx-shot{margin-left:20px!important;margin-right:20px!important}
}

/* ---------- phones: content centred (desktop and tablet layouts are untouched) ---------- */
/* five-layer cards on the home page: keep each screenshot inside its own card */
.fx-layer{isolation:isolate;-webkit-mask-image:-webkit-radial-gradient(white,black);clip-path:inset(0 round 20px)}
.fx-layershot{clip-path:inset(0);transform:translateZ(0)}
/* the screenshot box itself never reaches past its card, even where a browser ignores the clipping */
.fx-layershot img{left:0!important;right:0!important;margin:0 auto!important;max-width:100%;max-height:100%!important;object-fit:cover;object-position:top center}
@media (max-width:767px){

  /* home announcement bar */
  .fx-mann{position:relative;justify-content:center!important;text-align:center;padding:12px 48px!important}
  .fx-mann>span{flex:0 1 auto!important;min-width:0}
  .fx-mann>button{position:absolute;right:2px;top:50%;transform:translateY(-50%)}

  /* centre headings, copy, buttons, chips, cards and stats (live layout, its snapshot and the static footer) */
  :is(#dc-root,#lsp-static,#lsp-footer-static) :is(section,footer){text-align:center}
  :is(#dc-root,#lsp-static,#lsp-footer-static) :is(section,footer) :is(h1,h2,h3,h4,h5,p,blockquote){margin-left:auto!important;margin-right:auto!important}
  :is(#dc-root,#lsp-static,#lsp-footer-static) :is(section,footer) img{margin-left:auto;margin-right:auto}
  :is(#dc-root,#lsp-static,#lsp-footer-static) :is(section,footer) .r-f:not(.r-nw){justify-content:center!important}
  :is(#dc-root,#lsp-static,#lsp-footer-static) :is(section,footer) .r-f[style*="space-between"]:not([style*="gap"]){column-gap:12px}
  :is(#dc-root,#lsp-static,#lsp-footer-static) :is(section,footer) .r-nw:not([style*="space-between"]){justify-content:center!important}
  :is(#dc-root,#lsp-static,#lsp-footer-static) :is(section,footer) :is([style*="flex-direction: column"][style*="align-items: flex-start"],[style*="flex-direction:column"][style*="align-items:flex-start"]){align-items:center!important}
  :is(#dc-root,#lsp-static,#lsp-footer-static) :is(section,footer) :is([style*="align-self: flex-start"],[style*="align-self:flex-start"]){align-self:center!important}
  :is(#dc-root,#lsp-static,#lsp-footer-static) :is(section,footer) :is([style*="justify-content: flex-start"],[style*="justify-content:flex-start"]){justify-content:center!important}
  :is(#dc-root,#lsp-static,#lsp-footer-static) :is(section,footer) :not(article *):not(button):is([style*="text-align: left"],[style*="text-align:left"]){text-align:center!important}
  :is(#dc-root,#lsp-static,#lsp-footer-static) [data-screen-label]>.r-f{justify-content:center!important;text-align:center;column-gap:16px}
  /* careers: open roles as centred rows */
  .fx-role.fx-role{display:flex!important;flex-wrap:wrap;justify-content:center;text-align:center;gap:6px 16px!important}
  .fx-role>:nth-child(1){flex-basis:100%}
  .fx-role>:nth-child(4){display:none}

  /* stay left: long-form reading, accordions, forms and the phone menu */
  :is(#dc-root,#lsp-static,#lsp-footer-static) article,:is(#dc-root,#lsp-static,#lsp-footer-static) article *{text-align:left}
  :is(#dc-root,#lsp-static,#lsp-footer-static) :is(button[style*="text-align: left"],button[style*="text-align:left"])~*{text-align:left}
  :is(#dc-root,#lsp-static,#lsp-footer-static) :is(input,textarea,select),.hs-form-html,.hs-form-html *{text-align:left}
  .lsp-drawer,.lsp-drawer *{text-align:left}

  /* WordPress templates (blog posts, legal pages): centred header, article body stays left */
  .lsp-post-head .inner{text-align:center}
  .lsp-crumbs{justify-content:center}
  .lsp-byline{flex-direction:column;align-items:center;text-align:center}
  .lsp-byline .who{flex-direction:column;gap:10px}
  .lsp-byline .meta{justify-content:center}
  .lsp-askai-quick,.lsp-askai-quick .btns{justify-content:center;text-align:center}
  .lsp-askai,.lsp-askai .chips,.lsp-demo .bd{text-align:center;justify-content:center}
  .lsp-blog-hero,.lsp-related .head,.lsp-page-head{text-align:center;justify-content:center}
  .lsp-feature .bd,.lsp-card .bd{text-align:center;align-items:center}
  .lsp-feature .meta,.lsp-feature .ft,.lsp-filters,.lsp-pills{justify-content:center;text-align:center}
  .lsp-feature .ft{flex-direction:column;gap:14px}
  .lsp-filters{flex-direction:column;gap:12px}
}

/* home hero: room for the three-line headline (Chuck's copy, Pastel #16) */
@media (min-width:1100px){
  .fx-herosec{height:1258px!important}
  .fx-hshift{margin-top:88px!important}
}
