/* ============================================================
   Alocity site — mobile responsive overrides
   Injected into every exported page. Uses !important to beat
   the design-tool's inline styles. Desktop (>=769px) untouched.
   ============================================================ */

/* --- Homepage hero (ALL widths) -------------------------------------
   Remove the secondary "Watch Product Tour" button (the only anchor to
   #aimee on the page) from the hero. The remaining "Book a Demo" button
   sits in a justify-content:center flex row, so it re-centers under the
   hero copy automatically once its sibling is gone. */
a[href="#aimee"] {
  display: none !important;
}

/* --- Series A announcement banner (ALL widths) ----------------------
   A pinned amber bar above the sticky header, injected + maintained by
   mobile-nav.js (ensureBanner). It is fixed to the top; the sticky header
   and page content are offset downward by its measured height, exposed as
   --alocity-banner-h. Defaults to 0 so layout is correct before JS runs
   and after the banner is dismissed. */
:root { --alocity-banner-h: 0px; }

#alocity-banner {
  position: sticky; /* in-flow: takes its own space (no gap) and stays pinned while scrolling */
  top: 0; left: 0; right: 0;
  z-index: 1000; /* below the mobile drawer's huge z-index, above the header (60) */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 44px;
  box-sizing: border-box;
  background: #f9ae08;
  color: #1a2033;
  text-align: center;
}
#alocity-banner .alocity-banner-link {
  color: #1a2033;
  font: 600 13px/1.35 var(--font-figtree, system-ui, sans-serif);
  text-decoration: none;
  max-width: 80rem;
}
#alocity-banner .alocity-banner-link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
}
#alocity-banner .alocity-banner-link:hover .alocity-banner-caption { text-decoration: underline; }
#alocity-banner .alocity-banner-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 2px 12px;
  border-radius: 999px;
  background: #1a2033;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
#alocity-banner .alocity-banner-close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1a2033;
  cursor: pointer;
  border-radius: 6px;
}
#alocity-banner .alocity-banner-close:hover { background: rgba(0, 0, 0, 0.12); }
#alocity-banner .alocity-banner-close svg { width: 18px; height: 18px; }

/* The banner is in-flow (sticky), so no body offset is needed. The header
   still needs its sticky `top` moved down by the banner height so that, once
   scrolled, it pins directly beneath the pinned banner instead of overlapping
   it. */
header { top: var(--alocity-banner-h) !important; }

@media (min-width: 600px) {
  #alocity-banner .alocity-banner-link { font-size: 14px; }
}

/* --- Anti-FOUC cloak -------------------------------------------------
   The client bundler paints the page in its raw layout first, then
   mobile-nav.js applies the JS-driven layout fixes (hero sizing, bullet
   grids, comparison table, nav) — which is visible as a split-second
   reflow "artifact" on load. We hide the body until mobile-nav.js has
   rendered a stable, fixed layout, then fade it in.

   SAFETY: this is a default cloak (no JS needed to hide) but it carries a
   pure-CSS keyframe auto-reveal after 1.2s, so if mobile-nav.js fails to
   load or errors, the page can NEVER get stuck blank — it will always
   reveal itself. On the normal path mobile-nav.js adds `.alocity-revealed`
   to <html> much sooner and fades the content in. Applies at all widths. */
html:not(.alocity-revealed) body {
  opacity: 0;
  animation: alocity-cloak-failsafe 0.01s linear 1200ms forwards;
}
@keyframes alocity-cloak-failsafe {
  to { opacity: 1; }
}
html.alocity-revealed body {
  opacity: 1;
  transition: opacity 0.22s ease-out;
}

/* ------------------------------------------------------------------
   Footer bottom bar — center the legal links + copyright at ALL
   widths (desktop and mobile). The design tool exports this bar as a
   left-aligned flex row (links) with the copyright pushed to the far
   side. We stack them centered instead. Placed outside the mobile
   media query so it applies cross-device. Targets the light footer's
   last row (legal links div + copyright span) by structure since the
   markup ships without class hooks. */
footer[style*="gray-25"] > div > div:last-child {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}
footer[style*="gray-25"] > div > div:last-child > div {
  justify-content: center !important;
  width: 100% !important;
}
/* The copyright ships with inline `margin-left:auto`, which absorbs the
   left free space and pins it to the right even inside the centered
   column above. Reset all auto margins so it centers with the links. */
footer[style*="gray-25"] > div > div:last-child > * {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@media (max-width: 767.98px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* --- Footer tap targets (QA P3-11): footer links ship 16-17px tall,
     well under the 32px floor QA measured against (44px is the full
     guideline). inline-block + block padding grows each link's hit box to
     ~35px without touching desktop (this block is mobile-only). Scoped to
     the footer, where QA found nearly all the small targets, so dense body
     copy is unaffected. The badge/social image links are excluded — their
     images already set the hit box and padding would misalign them. --- */
  footer a:not(:has(img)) {
    display: inline-block;
    padding-block: 9px;
  }

  /* --- Header logo: left-align below the breakpoint (QA P2-7 / P1-6).
     The page's own header row is justify-content:center, which pushed the
     centered logo rightward into the absolutely-positioned Contact Us CTA
     (right:70px) — under ~430px they overlapped. The logo anchor is the only
     in-flow visible child of the row (nav + desktop cluster are display:none,
     CTA + burger are absolute), so an auto right margin absorbs all free
     space to its right and pins it flush left, matching the desktop layout.
     :first-child keeps this off any other header link to "/". --- */
  header a[href="/"]:first-child {
    margin-right: auto !important;
  }

  /* --- Industries carousel: hide the prev/next arrow controls on mobile.
     The arrows live in a bare flex <div> holding the two round buttons
     (button.scp1); on a touch phone they only create an awkward empty band
     above the cards, since the track is already swipeable. Desktop keeps
     them (this rule is inside the mobile media query). --- */
  div:has(> button.scp1) {
    display: none !important;
  }

  /* --- Industries carousel: right-edge fade to signal "more to swipe".
     With the arrows gone, the peeking next card is the cue; this gradient
     over the right edge reinforces that there's more content. It sits on the
     section (which is position:relative + overflow:hidden) fading the card
     edge into the section background, and is pointer-events:none so it never
     blocks touch scrolling. --- */
  #industries {
    position: relative;
  }
  #industries::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 56px;
    background: linear-gradient(to right, rgba(248, 250, 252, 0), var(--gray-25));
    pointer-events: none;
    z-index: 2;
  }

  /* --- "Works with what you already own" diagram: cloud hub (mobile).
     JS (styleCloudHub) tags the central amber hub box, hides its wordmark +
     "Cloud" label, and injects <span data-alocity-cloud-mark><img></span>.
     Here we reshape the amber box into a cloud silhouette via an SVG mask
     (keeping its amber gradient), give it a soft amber shadow, and crop the
     injected full logo down to just the white Alocity chevron. Desktop is
     untouched (this lives inside the mobile media query). --- */
  [data-alocity-cloud-hub] {
    -webkit-mask: url("/site/cloud-mask.svg") no-repeat center / 100% 100%;
    mask: url("/site/cloud-mask.svg") no-repeat center / 100% 100%;
    border: 0 !important;
    border-radius: 0 !important;
    width: 150px !important;
    min-width: 150px !important;
    height: 99px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    filter: drop-shadow(0 9px 14px rgba(249, 174, 8, 0.30));
  }
  /* White chevron: crop the full logo (700x177) to the chevron's pixel box
     (x:9-240, y:8-156) scaled ~0.39, and force it white. Fixed dimensions
     override the global fluid-media img rule. */
  [data-alocity-cloud-mark] {
    display: block;
    overflow: hidden;
    width: 90px;
    height: 58px;
    /* Center the chevron on the CLOUD, not on its own box. The mask
       silhouette is asymmetric inside its 200x132 viewBox (it spans x 14-196,
       y 6-116), so plain flex centering left the mark reading high and left.
       Offset measured, not guessed: the chevron's real ink was rasterised and
       swept across the silhouette to find the placement with equal gold on
       all four sides. At (3px, -2px) the clearances are top 12 / bottom 11.5 /
       left 18.5 / right 18 with no ink clipped by the mask. (The filled-area
       centroid, 106.6/70.2, is NOT the right target -- the wide flat base
       drags it down and the mark ends up sitting on the cloud's bottom edge.)
       Transform rather than margin so the crop box below is untouched, and px
       offsets still scale with the parent diagram's `zoom`. */
    transform: translate(3px, -2px);
  }
  [data-alocity-cloud-mark] img {
    width: 272px !important;
    height: 69px !important;
    max-width: none !important;
    margin: -3px 0 0 -4px !important;
    filter: brightness(0) invert(1);
  }

  /* --- Sticky header: on mobile show ONLY a centered logo + the hamburger.
     The bundled header row ships as:
       [ logo <a> | <nav> (already hidden) | <div> Login + Get Demo | <button> hamburger ]
     Hide the Login / Get Demo CTA cluster, then center the logo by removing
     the hamburger from flow (absolute, pinned right) so the only remaining
     in-flow item — the logo — sits dead center. */
  header > div {
    position: relative !important;
    justify-content: center !important;
  }
  header > div > div {
    display: none !important; /* Login + Get Demo cluster */
  }
  header > div > button[aria-label="Open menu" i] {
    position: absolute !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  /* --- Fluidize hardcoded pixel widths --- */
  [style*="width:"] {
    max-width: 100% !important;
  }

  /* --- Never let text stay on a single forced line on mobile. Some
         headings ship with `white-space:nowrap`, which can't wrap and
         bleeds off the right edge at narrow widths / before font sizing
         settles. Force headings to wrap and break over-long words. Kept
         narrow (headings + body copy) so the carefully-tuned diagram and
         badge components are not affected. --- */
  h1, h2, h3, h4, h5, h6, p, li {
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
  }
  /* media always fluid.
     Exception: the HubSpot demo-form iframe (.hs-form-iframe) manages its own
     height dynamically via inline style (HubSpot's resize script). Forcing
     `height:auto` here collapsed it to the 150px iframe default, clipping the
     form after the first fields on mobile — so it looked like mobile had fewer
     fields than desktop. Excluding it lets its real (690px+) height apply. */
  img, svg, video, canvas, picture, iframe:not(.hs-form-iframe) {
    max-width: 100% !important;
    height: auto !important;
  }
  .hs-form-iframe {
    max-width: 100% !important;
  }

  /* --- App store / Google Play badges: the fluid-media rule above wipes
         their inline height, so `max-width:100%` blows them up to full
         container width. Cap them at a standard mobile badge height and
         let width follow the aspect ratio. Targeted by alt text so only
         the store badges are affected. --- */
  img[alt*="App Store" i],
  img[alt*="Google Play" i],
  img[alt*="Download on the" i],
  img[alt*="Get it on" i] {
    height: 44px !important;
    width: auto !important;
    max-width: 100% !important;
  }

  /* --- Footer brand logo: same problem as the badges. The fluid-media
         rule wipes its inline height (28px), so it balloons to the full
         container width (~310px tall image). Clamp it back to a compact,
         mobile-friendly height and let the width follow the aspect ratio. */
  footer img[alt="Alocity" i] {
    height: 30px !important;
    width: auto !important;
    max-width: 60% !important;
  }

  /* --- Partner brand mark inside a hero "eyebrow" pill badge: same problem
         as the badges above. The fluid-media rule wipes the logo's small
         inline height (Mercury ships 15px), so `max-width:100%` balloons it
         to the full badge width. Because the badge is an inline-flex pill
         with `border-radius:999px`, it inflates into a giant white oval and
         squeezes the adjoining label ("Open-architecture hardware") into a
         one-character-wide vertical sliver. Re-pin the shipped height and let
         width follow the aspect ratio. --- */
  img[alt="Mercury" i] {
    height: 15px !important;
    width: auto !important;
    max-width: 50% !important;
  }

  /* --- Reader hardware card photos: the fluid-media rule above forces
         `height:auto`, so the tall Signo reader images render at their
         natural height and bleed out of the fixed-height photo frame into
         the card's text area on mobile. Re-pin them to fill the frame and
         letterbox with object-fit:contain so they stay inside the image
         area. `data-reader-photo` is set on each card <img>. --- */
  img[data-reader-photo] {
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    object-fit: contain !important;
  }

  /* --- Header/brand logo: clamp to bar height so it can't bleed over
         the page. The design tool sets a fixed 700px-wide logo whose
         container is wider than the viewport, so max-width:100% alone
         does not constrain it. --- */
  header { overflow: hidden !important; }
  header img, header svg,
  header a[href="/"] img, header a[href="/"] svg,
  header [class*="logo"] img, header [class*="logo"] svg {
    max-height: 34px !important;
    width: auto !important;
    max-width: 60vw !important;
  }

  /* --- Collapse multi-column grids to a single column --- */
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* --- Bundled marketing-page footer -----------------------------------
     The footer's top row ships as a 6-track grid:
       [ brand | Platform | Products | Company | Support | Get the App ]
     (inline `grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr 1.1fr`). The
     collapse rule above flattens it to a single stacked column on mobile.
     Instead, lay it out to match the native footer: the brand block and the
     "Get the App" block span the full width, and the four menu columns form
     a 2x2 grid. `order` is used so the menu flows Platform / Products (top)
     then Support / Company (bottom) — i.e. Support bottom-left, Company
     bottom-right — even though the DOM order is Platform, Products, Company,
     Support. (Social icons + phone can't be relocated across containers with
     CSS, so they stay within their shipped blocks.) */
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 28px 20px !important;
  }
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(1) {
    grid-column: 1 / -1 !important;
    order: 0;
    text-align: center !important;
  }
  /* block logo can't be centered by text-align, so center via auto margins */
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(1) img {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  /* center the social-icon flex row within the brand block */
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(1) > div {
    justify-content: center !important;
  }
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(2) { order: 1; } /* Platform */
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(3) { order: 2; } /* Products */
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(5) { order: 3; } /* Support */
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(4) { order: 4; } /* Company */
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(6) {
    grid-column: 1 / -1 !important;
    order: 5;
  }

  /* Center the menu columns and the "Get the App" block. The shipped markup is
     left-aligned for the 6-across desktop row; on mobile that left rag sat
     under an already-centered brand block, so the footer read as lopsided.
     Centering every block makes the whole footer symmetrical on narrow
     screens. The 2x2 grid itself is kept (not stacked) so the four menus stay
     compact. */
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(2),
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(3),
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(4),
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(5),
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(6) {
    text-align: center !important;
  }
  /* The app-badge stack is a flex column with `align-items:flex-start`, which
     text-align cannot override — center the flex cross-axis too. */
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(6) > div {
    align-items: center !important;
    justify-content: center !important;
  }
  /* Badges are block-level <img> inside <a>; center them within the full-width
     row so they can't hug the left edge. */
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(6) img {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  /* Each menu column's link list is a grid with `justify-items:start`, which
     shrink-wraps every <a> to its text width and pins it left — so the
     text-align:center above had no box to center within. Center the grid items
     themselves. Scoped to the menu columns (2-5) so the brand block's social
     row, handled above, is untouched. */
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(2) > div,
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(3) > div,
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(4) > div,
  footer [style*="1.4fr 1fr 1fr 1fr 1fr 1.1fr"] > *:nth-child(5) > div {
    justify-items: center !important;
  }

  /* --- "The Intelligence Loop" vertical timeline (Detect → Audit) ---------
     Each step is a `72px 1fr` grid: a fixed icon rail on the left (with the
     dashed connector threaded through it) and the numbered step content on
     the right. The collapse rule above would flatten this to one column,
     centering every icon above its text and breaking the timeline. Keep the
     icon-left / content-right structure on tablet and mobile. The two
     attribute selectors give this higher specificity than the rule above. */
  [style*="grid-template-columns"][style*="72px 1fr"] {
    grid-template-columns: 72px 1fr !important;
  }

  /* --- "Why Alocity" comparison table -----------------------------------
     Traditional-vs-Alocity table: each row is a `1fr 1fr` grid. The
     collapse rule above would stack the two comparison columns and jumble
     them. Keep the side-by-side comparison (as designed) and shrink the
     padding, fonts, and check/minus icons so both columns fit the narrow
     viewport. The root is tagged by mobile-nav.js -> markComparisonChart. */
  [data-alocity-compare] > div {
    grid-template-columns: 1fr 1fr !important;
  }
  /* every cell: keep icon inline with its (wrapping) label, tighten space */
  [data-alocity-compare] > div > div {
    flex-wrap: nowrap !important;
    padding: 12px 10px !important;
    gap: 8px !important;
  }
  /* body-row labels */
  [data-alocity-compare] > div > div > span {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }
  /* check / minus icon circles */
  [data-alocity-compare] > div > div > span:first-child {
    width: 16px !important;
    height: 16px !important;
  }
  /* header row: eyebrow + title */
  [data-alocity-compare] > div:first-child > div > *:first-child {
    font-size: 9.5px !important;
    letter-spacing: 0.04em !important;
  }
  [data-alocity-compare] > div:first-child > div > *:last-child {
    font-size: 14px !important;
    line-height: 1.2 !important;
  }

  /* --- Let horizontal flex rows wrap instead of overflowing --- */
  [style*="display:flex"],
  [style*="display: flex"] {
    flex-wrap: wrap !important;
  }

  /* --- Horizontal scroll-snap carousels: KEEP them as swipeable
         horizontal carousels on tablet/mobile (matching desktop). The
         generic `flex-wrap: wrap` rule above would otherwise stack every
         slide into a full-width vertical list. We override the track back
         to `nowrap` (preserving the native horizontal scroll + snap) and
         give each slide a fixed carousel width so the next card peeks in
         at the edge, signalling there is more to swipe. The large desktop
         side padding is trimmed to a small gutter. --- */
  [style*="scroll-snap-type"] {
    flex-wrap: nowrap !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  [style*="scroll-snap-align"] {
    flex: 0 0 auto !important;
    width: min(300px, 82vw) !important;
    max-width: 82vw !important;
  }

  /* ============================================================
     Diagrams & flow charts
     The design tool exports these as a fixed-height relative box
     holding absolutely-positioned card DIVs plus an absolute SVG
     that draws the dashed connector lines between them. We PRESERVE
     this exact desktop hub-and-spoke arrangement on mobile — a
     companion script (mobile-nav.js -> fitDiagrams) scales each
     diagram down with `zoom` so it fits the viewport while keeping
     the identical layout. Here we only guarantee the connector SVG
     keeps exactly filling its wrapper, overriding the global
     fluid-media rule below so the dashed lines stay aligned. */
  div[style*="position: relative"]:has(> svg[style*="position: absolute"]):has(> div[style*="position: absolute"]) {
    max-width: none !important;
  }
  div[style*="position: relative"]:has(> svg[style*="position: absolute"]):has(> div[style*="position: absolute"]) > svg[style*="position: absolute"] {
    max-width: none !important;
    width: 100% !important;
    height: 100% !important;
    inset: 0 !important;
  }

  /* Standalone illustration diagrams (relative box + a single
     absolute SVG, no card divs): flow the SVG to full width. */
  div[style*="position: relative"][style*="height:"]:not(:has(> div[style*="position: absolute"])) {
    height: auto !important;
    min-height: 0 !important;
  }
  div[style*="position: relative"]:not(:has(> div[style*="position: absolute"])) > svg[style*="position: absolute"] {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    inset: auto !important;
  }

  /* --- Clamp oversized display headings so they don't clip --- */
  [style*="font-size: 72px"], [style*="font-size:72px"] { font-size: 40px !important; }
  [style*="font-size: 68px"], [style*="font-size:68px"] { font-size: 38px !important; }
  [style*="font-size: 64px"], [style*="font-size:64px"] { font-size: 37px !important; }
  [style*="font-size: 60px"], [style*="font-size:60px"] { font-size: 36px !important; }
  [style*="font-size: 56px"], [style*="font-size:56px"] { font-size: 34px !important; }
  [style*="font-size: 52px"], [style*="font-size:52px"] { font-size: 32px !important; }
  [style*="font-size: 50px"], [style*="font-size:50px"] { font-size: 31px !important; }
  [style*="font-size: 48px"], [style*="font-size:48px"] { font-size: 30px !important; }
  [style*="font-size: 46px"], [style*="font-size:46px"] { font-size: 29px !important; }
  [style*="font-size: 44px"], [style*="font-size:44px"] { font-size: 28px !important; }
  [style*="font-size: 42px"], [style*="font-size:42px"] { font-size: 27px !important; }
  [style*="font-size: 40px"], [style*="font-size:40px"] { font-size: 26px !important; }
  [style*="font-size: 38px"], [style*="font-size:38px"] { font-size: 25px !important; }
  [style*="font-size: 36px"], [style*="font-size:36px"] { font-size: 24px !important; }
  [style*="font-size: 34px"], [style*="font-size:34px"] { font-size: 23px !important; }
  [style*="font-size: 32px"], [style*="font-size:32px"] { font-size: 22px !important; }

  /* headings & long words wrap cleanly */
  h1, h2, h3, h4, [style*="font-size"] {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    line-height: 1.15 !important;
  }

  /* --- Tame very large fixed paddings that waste vertical space --- */
  [style*="padding: 120px"], [style*="padding:120px"],
  [style*="padding: 100px"], [style*="padding:100px"],
  [style*="padding: 96px"], [style*="padding:96px"],
  [style*="padding: 80px"], [style*="padding:80px"] {
    padding: 40px 20px !important;
  }
  [style*="padding-top: 120px"], [style*="padding-top:120px"],
  [style*="padding-top: 100px"], [style*="padding-top:100px"],
  [style*="padding-top: 96px"], [style*="padding-top:96px"] { padding-top: 48px !important; }
  [style*="padding-bottom: 120px"], [style*="padding-bottom:120px"],
  [style*="padding-bottom: 100px"], [style*="padding-bottom:100px"],
  [style*="padding-bottom: 96px"], [style*="padding-bottom:96px"] { padding-bottom: 48px !important; }
  [style*="padding-left: 80px"], [style*="padding-left:80px"],
  [style*="padding-left: 64px"], [style*="padding-left:64px"] { padding-left: 20px !important; }
  [style*="padding-right: 80px"], [style*="padding-right:80px"],
  [style*="padding-right: 64px"], [style*="padding-right:64px"] { padding-right: 20px !important; }

  /* --- Hide the desktop nav links / CTAs inside the header;
         the injected hamburger takes over (see mobile-nav.js) --- */
  header nav { display: none !important; }
  [data-alocity-mobile-hidden="1"] { display: none !important; }
}

/* Hamburger button + drawer + scrim are hidden on desktop.
   IMPORTANT: the drawer/scrim only get `position: fixed` inside the mobile
   media query below. Without an explicit desktop `display: none` they fall
   back to normal flow at the bottom of <body> on desktop, rendering the
   full-width amber CTA + nav toggles over the page (the "broken diagram").
   Hiding them here keeps them mobile-only. */
#alocity-burger,
#alocity-contact-cta,
#alocity-drawer,
#alocity-scrim { display: none; }
@media (max-width: 767.98px) {
  #alocity-burger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: inherit;
    margin-left: auto;
  }
  #alocity-burger svg { width: 26px; height: 26px; }

  /* Injected mobile header CTA (see insertContactCTA in mobile-nav.js). It
     takes over the `margin-left: auto` so the CTA + burger sit together at
     the right edge; without the override both would claim the free space and
     the CTA would float into the middle of the header. */
  #alocity-contact-cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 9px 16px;
    border-radius: 999px;
    background: #f9ae08;
    color: #1a2033;
    font: 700 14px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
    text-decoration: none;
    white-space: nowrap;
  }
  #alocity-contact-cta:active { background: #e69f04; }
  #alocity-contact-cta ~ #alocity-burger { margin-left: 4px; }

  /* Set by syncContactCTAPosition() when the page's own CSS has taken the
     burger out of flow (`position:absolute; right:20px`). The header row is
     `position:relative`, so anchoring to `right:70px` clears the 42px burger
     at right:20px with an 8px gap instead of rendering beneath it. */
  #alocity-contact-cta[data-alo-burger-abs] {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
  }

  /* Very narrow phones: keep the logo, CTA and burger on one line. */
  @media (max-width: 380px) {
    #alocity-contact-cta { padding: 8px 12px; font-size: 13px; }
  }

  #alocity-drawer {
    display: block;
    position: fixed;
    inset: 0 0 0 auto;
    width: min(86vw, 360px);
    height: 100vh;
    background: #0b1220;
    color: #fff;
    z-index: 2147483000;
    transform: translateX(100%);
    transition: transform .25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -12px 0 40px rgba(0,0,0,.4);
    padding: 20px 20px 60px;
  }
  #alocity-drawer.open { transform: translateX(0); }

  #alocity-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 2147482000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }
  #alocity-scrim.open { opacity: 1; pointer-events: auto; }
}

/* Drawer internals (always styled; only shown on mobile via display) */
#alocity-drawer .adr-close {
  background: transparent; border: none; color: #fff;
  font-size: 28px; line-height: 1; cursor: pointer;
  position: absolute; top: 14px; right: 16px;
}
#alocity-drawer .adr-group { border-bottom: 1px solid rgba(255,255,255,.12); }
#alocity-drawer .adr-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: transparent; border: none; color: #fff; cursor: pointer;
  font: 600 16px/1.2 system-ui, sans-serif; padding: 11px 4px; text-align: left;
}
/* The submenu affordance: a white "+" icon on each accordion row so users
   can tell the item expands into a sub-menu. Rotates to an "×" when open.
   Explicit !important sizing is required because the inline SVG ships with
   no width/height and the global mobile `svg{height:auto}` rule would
   otherwise collapse it to nothing (why no icon was showing before). */
#alocity-drawer .adr-toggle .chev {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; width: 22px; height: 22px; margin-left: 12px;
  color: #fff; transition: transform .2s ease;
}
#alocity-drawer .adr-toggle .chev svg {
  width: 20px !important; height: 20px !important;
  stroke: #fff; stroke-width: 2.25;
}
#alocity-drawer .adr-group.open .adr-toggle .chev { transform: rotate(45deg); }
#alocity-drawer .adr-panel {
  display: none; padding: 0 4px 12px;
}
#alocity-drawer .adr-group.open .adr-panel { display: block; }
#alocity-drawer .adr-panel a,
#alocity-drawer > a.adr-link {
  display: block; color: #cbd5e1; text-decoration: none;
  font: 500 15px/1.25 system-ui, sans-serif; padding: 6px 4px;
}
#alocity-drawer > a.adr-link { color: #fff; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.12); }
#alocity-drawer .adr-panel a:active { color: #fff; }
#alocity-drawer .adr-cta {
  display: block; text-align: center; text-decoration: none;
  margin-top: 16px; padding: 13px 16px; border-radius: 10px;
  font: 600 15px/1 system-ui, sans-serif;
}
#alocity-drawer .adr-cta.primary { background: #f5b301; color: #111; }
#alocity-drawer .adr-cta.secondary { background: rgba(255,255,255,.1); color: #fff; margin-top: 10px; }
#alocity-drawer .adr-brand { font: 700 20px/1 system-ui, sans-serif; color:#fff; margin-bottom: 8px; }

/* --- Product subgroups (Platform / AI Video / Access Control / ...) --- */
#alocity-drawer .adr-sub { padding: 2px 0 6px; }
#alocity-drawer .adr-sub + .adr-sub { border-top: 1px solid rgba(255,255,255,.08); padding-top: 6px; }
#alocity-drawer .adr-sub-title {
  font: 700 13px/1.2 system-ui, sans-serif; letter-spacing: .04em;
  text-transform: uppercase; color: #f5b301; padding: 2px 4px 4px;
}
/* Per-section descriptor is hidden on mobile to keep the drawer compact
   so the full navigation is visible at a glance (mobile-only drawer). */
#alocity-drawer .adr-sub-desc { display: none; }
#alocity-drawer .adr-sub a {
  display: block; color: #e2e8f0; text-decoration: none;
  font: 500 15px/1.25 system-ui, sans-serif; padding: 6px 4px; min-height: 0;
  box-sizing: border-box;
}
#alocity-drawer .adr-sub a:active { color: #fff; }

/* --- Accessibility: visible focus states for keyboard users --- */
#alocity-burger:focus-visible,
#alocity-drawer a:focus-visible,
#alocity-drawer button:focus-visible {
  outline: 2px solid #f5b301;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Top-level direct links keep a comfortable tap target; nested panel links
   stay compact so the whole menu is visible at a glance on mobile. */
#alocity-drawer > a.adr-link { min-height: 44px; box-sizing: border-box; }

/* --- Dark CTA band claim list ---------------------------------------
   The closing CTA band on /control-center and /mercury-controllers ends with
   three short cyan claims laid out as a centered flex row, separated by two
   standalone "·" spans that are themselves flex items.

   Below ~800px the row wraps and the second separator is ORPHANED at the end
   of the first line. Each line is still mathematically centered (both report
   the same center as the row), but the lone trailing dot adds visual weight
   on the right with no phrase after it, so the claims read as shifted left.

   Stack the claims one per line and drop the separators, so every line is
   centered on its own text and no dot can be left dangling. Desktop keeps the
   single-row treatment.

   NOTE the breakpoint is 899px, NOT the site-wide 768px. Measured, not guessed:
   the claims + separators + gaps need 692.1px, and the band gives the row its
   container width minus 120px of side padding. That container is capped at 820px
   but ALSO sits inside an outer wrapper with ~80px of its own padding, so it only
   reaches the full 820px (row 700px, 7.9px of slack) once the viewport hits 900px.
   Below that the row is narrower and wraps: verified 2 lines with the orphaned dot
   at 800/860/880/892px, 1 line at 900/940/1024px. A 768px — or even an 819px —
   query therefore leaves the artifact visible on a ~800px screen. */
@media (max-width: 899px) {
  [data-alocity-inline-list] {
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    text-align: center !important;
  }
  [data-alocity-inline-list] [data-alocity-sep] { display: none !important; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  #alocity-drawer, #alocity-scrim { transition: none !important; }
}
