/*
==================================================================
TIMETRAX MEGA MENU
The panel is generated at runtime by assets/js/mega-menu.js; this
file styles it. Full-bleed under the navbar on desktop (section 2),
an inline accordion inside the drawer on mobile (section 9).

Follows the site design system: brand orange only, soft ambient
wash. See .claude/skills/timetrax-design-system. Note the panel
itself is deliberately NOT a glass surface - see section 2.
==================================================================
*/

/* --- 0. CRAWLABLE LINK SOURCE --- */
/* scripts/static-nav-source.ps1 writes the real module / device / company /
   careers links into each page as a plain nested <ul class="tt-nav-src">, so
   that a crawler downloading the HTML sees the header's link graph instead of
   three fragment anchors. mega-menu.js reads that list on init and REMOVES it,
   so on a JS page these rules apply for a single frame at most.

   They exist for the frame before the script runs, and for the no-JS case,
   where the list stays in the document. This is the ordinary submenu pattern -
   the same display:none every dropdown nav on the web uses - not hidden text:
   the links are genuine navigation to genuine pages, and JS reveals the very
   same destinations in the panel. Do not add extra links here that are not
   also in the visible menu. */
.tt-nav-src {
  display: none;
}

/* --- 1. TRIGGER --- */
/* The trigger needs to read as physically attached to the open panel, so it
   picks up a tinted pill and its caret flips - same idea as the reference. */
.tt-mega-trigger {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
}

.tt-mega-caret {
  font-size: 0.65rem;
  transition: transform 0.25s var(--tt-ease, ease);
}

.tt-has-mega.is-mega-open .nav-link {
  color: var(--tt-primary) !important;
}

.tt-has-mega.is-mega-open .tt-mega-caret {
  transform: rotate(180deg);
}

/* --- 1b. MINI DROPDOWN (Resources) ---
   A compact panel anchored to its own trigger. It stays inside its <li> in
   both layouts: at this width position:absolute resolves against the <li>, so
   unlike the full-bleed mega panel it is unaffected by the navbar's
   backdrop-filter creating a containing block for fixed elements. */
.tt-has-mini {
  position: relative;
}

.tt-mini-panel {
  background: #FDFCFB;
  border: 1px solid rgba(var(--tt-primary-rgb), 0.14);
  border-radius: 14px;
  box-shadow: 0 18px 44px -14px rgba(31, 38, 80, 0.24), 0 2px 6px rgba(31, 38, 80, 0.05);
  left: 50%;
  min-width: 208px;
  opacity: 0;
  padding: 0.5rem;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 0.85rem);
  transform: translateX(-50%) translateY(-8px);
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.2s;
  visibility: hidden;
  z-index: 1040;
}

.tt-mini-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  visibility: visible;
}

/* Bridges the gap between trigger and panel so the pointer can travel down
   without crossing dead space and triggering the close timer. */
.tt-mini-panel::before {
  content: '';
  height: 0.85rem;
  left: 0;
  position: absolute;
  right: 0;
  top: -0.85rem;
}

.tt-mini-item {
  align-items: center;
  border-radius: 9px;
  color: var(--tt-dark);
  display: flex;
  font-size: 0.9rem;
  font-weight: 500;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.tt-mini-item:hover,
.tt-mini-item:focus-visible {
  background-color: rgba(var(--tt-primary-rgb), 0.09);
  color: var(--tt-primary);
}

.tt-mini-item-icon {
  color: var(--tt-primary);
  flex: 0 0 auto;
  font-size: 0.8rem;
  text-align: center;
  width: 16px;
}

/* --- 2. PANEL SHELL --- */
.tt-navbar {
  position: relative;
}

/* A zero-size anchor on <body> whose only job is to own the stacking context
   for the panels. 1020 keeps them below the header (1030) so the navbar and
   its triggers stay above the open panel. */
.tt-mega-host {
  position: fixed;
  top: 0;
  left: 0;
  height: 0;
  width: 0;
  z-index: 1020;
}

/* Edge to edge horizontally - that full width is what makes the reference menu
   so readable, since nothing of the page sits beside it. Vertically the panel
   is only as tall as its content; max-height is just a guard so a short window
   scrolls the contents instead of running off screen.
   position:fixed (not absolute) so it stays locked under the header and does
   not need an offset that scrolling would invalidate. --tt-mega-top is the live
   header height, measured in mega-menu.js, because the header shrinks on
   scroll when the top contact strip collapses. */
.tt-mega-panel {
  /* --tt-mega-gutter is the space between the viewport edge and the site's
     1320px content column. Every edge-touching child pads by it so copy lines
     up with the page grid while backgrounds still run edge to edge.
     --tt-mega-rail-w is the rail's *content* width, not its column width -
     see the note on .tt-mega-body. */
  --tt-mega-gutter: max(1.5rem, calc((100vw - 1320px) / 2));
  --tt-mega-rail-w: clamp(255px, 23vw, 380px);

  position: fixed;
  top: var(--tt-mega-top, 110px);
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--tt-mega-top, 110px));

  display: flex;
  flex-direction: column;

  /* Fully opaque, and deliberately NOT a glass surface. The site's glass
     treatment was tried here first: the hero headline and the video block sit
     directly behind this panel and bled through badly, and backdrop-filter on
     an element this large is an expensive repaint on every open. Both
     reference menus use a solid panel for the same reason. */
  background: #FDFCFB;
  border-top: 1px solid rgba(var(--tt-primary-rgb), 0.12);
  box-shadow: 0 24px 60px -20px rgba(31, 38, 80, 0.25);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.22s;
}

.tt-mega-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Faint brand wash in the top-left corner so the panel is not a flat white
   slab - the same ambient-glow treatment used across the page sections. */
.tt-mega-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: none;
  pointer-events: none;
}

/* Backgrounds run edge to edge, but the text inside still lines up with the
   page's container so the menu reads as part of the site grid rather than a
   separate full-width thing. Hence the max() padding instead of a wrapper. */
/* The rail column is its content width PLUS the gutter, because the rail is the
   one column that touches the viewport edge. Sizing the column at just the
   content width and then padding by the gutter is the obvious-looking version
   and it is wrong: on a 1920px screen the gutter is 300px, which would leave a
   380px column with ~80px of usable space and wrap the rail one word per line.

   The rail also tracks the viewport rather than being a fixed 296px, which
   would eat a 1200px screen and look mean on a 1920px one. */
.tt-mega-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(var(--tt-mega-rail-w) + var(--tt-mega-gutter));
  min-height: 0;
  overflow-y: auto;
  position: relative;
}

.tt-mega-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.9rem clamp(1.5rem, 3vw, 3rem) 1.9rem var(--tt-mega-gutter);
}

/* --- 2b. DESKTOP FAMILY TABS ---
   Splits the 37 modules into the two lines the business sells. Desktop only:
   below 992px this whole strip is display:none and the group-heading accordion
   in section 3 takes over, which is why both mechanisms can coexist in one
   panel without fighting.

   The tabs are hidden by default and revealed at >=992px rather than the other
   way round, so a page that somehow renders without the media query shows the
   full list (the old behaviour) rather than an empty panel. */
.tt-mega-tabs {
  display: none;
}

@media (min-width: 992px) {
  .tt-mega-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.4rem;
    border-bottom: 1px solid rgba(var(--tt-dark-rgb), 0.1);
    padding-bottom: 0.75rem;
  }

  .tt-mega-tab {
    align-items: center;
    background: none;
    border: 0;
    border-radius: 10px;
    color: rgba(var(--tt-dark-rgb), 0.62);
    cursor: pointer;
    display: inline-flex;
    font-family: var(--tt-font-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    gap: 0.5rem;
    letter-spacing: -0.01em;
    padding: 0.5rem 0.95rem;
    transition: color 0.18s ease, background-color 0.18s ease;
  }

  .tt-mega-tab:hover {
    background: rgba(var(--tt-dark-rgb), 0.05);
    color: var(--tt-dark);
  }

  .tt-mega-tab:focus-visible {
    outline: 2px solid var(--tt-primary);
    outline-offset: 2px;
  }

  .tt-mega-tab.is-active {
    background: rgba(var(--tt-primary-rgb), 0.1);
    color: var(--tt-primary);
  }

  .tt-mega-tab-count {
    background: rgba(var(--tt-dark-rgb), 0.08);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.22rem 0.45rem;
  }

  .tt-mega-tab.is-active .tt-mega-tab-count {
    background: rgba(var(--tt-primary-rgb), 0.18);
  }

  /* Only the selected family renders. `display: none` rather than visibility or
     height, so the hidden grid costs no layout and the panel height is that of
     one family instead of both. The links stay in the DOM either way, and the
     crawlable copy of them lives in the tt-nav-src markup regardless. */
  .tt-mega-group {
    display: none;
  }

  .tt-mega-group.is-tab-active {
    display: block;
  }

  /* The tab strip now labels the family, so the in-panel heading would say it
     twice. Kept in the DOM because it is the mobile accordion trigger. */
  .tt-mega-group-heading {
    display: none;
  }

  .tt-mega-group + .tt-mega-group {
    margin-top: 0;
  }
}

/* --- 3. HEADINGS --- */
.tt-mega-group + .tt-mega-group {
  margin-top: 1.5rem;
}

.tt-mega-group-heading {
  margin: 0;
}

/* A <button> so it can drive the mobile accordion, stripped back to read as a
   plain heading on desktop where it does nothing. */
.tt-mega-group-title {
  align-items: center;
  background: none;
  border: 0;
  color: var(--tt-dark);
  cursor: default;
  display: flex;
  font-family: var(--tt-font-secondary);
  font-size: 1.05rem;
  font-weight: 700;
  gap: 0.55rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.85rem;
  padding: 0 0 0.55rem;
  position: relative;
  text-align: left;
  width: 100%;
}

/* Only meaningful on mobile, where the heading is a real control. */
.tt-mega-group-caret {
  display: none;
}

/* Short brand underline instead of a full rule - keeps the group headers from
   chopping the panel into hard horizontal bands. */
.tt-mega-group-title::after {
  background: var(--tt-gradient-primary);
  border-radius: 2px;
  bottom: 0;
  content: '';
  height: 2px;
  left: 0;
  position: absolute;
  width: 34px;
}

.tt-mega-group-count {
  background: rgba(var(--tt-primary-rgb), 0.1);
  border-radius: 999px;
  color: var(--tt-primary);
  font-family: var(--tt-font-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
}

/* --- 4. GRIDS --- */
/* Flows BY COLUMN, not by row (2026-09-11). The module order in mega-menu.js
   is one flat column-major sequence, and the SAME list has to read in that
   order on a phone, where this grid collapses to `1fr` below 992px. A default
   row-major fill would satisfy one of those and scramble the other.

   --tt-mega-rows is set inline per group by grid() in mega-menu.js as
   ceil(count / 3); the fallback only matters if that attribute is ever lost.
   Without a row track, `grid-auto-flow: column` would lay every module out in
   a single row. */
.tt-mega-grid {
  display: grid;
  gap: 0.15rem 0.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(var(--tt-mega-rows, 9), auto);
  grid-auto-flow: column;
}

/* --- 4b. HCM SUB-CATEGORIES (2026-09-14) ---
   The HCM half of the panel is split into three named shelves: Core HR &
   Payroll, Talent Acquisition & Performance Management, Employee Services &
   Administration. Built by grid() in mega-menu.js from each module's data-c.

   THE HEADINGS ARE NOT CONTROLS. No href, no button, no tabindex, no hover
   state - they name a shelf, and there is no page behind any of them. Keep it
   that way: a heading that looks clickable in a menu full of links is a
   promise the site cannot keep.

   A CATEGORY GRID FLOWS BY ROW, unlike the uncategorised one above. It has to
   override both the column flow and the row track, or a 6-item category would
   inherit the 9-row template and render as one tall column. */
.tt-mega-cat-grid {
  grid-auto-flow: row;
  grid-template-rows: none;
}

.tt-mega-cat + .tt-mega-cat {
  margin-top: 1.15rem;
}

.tt-mega-cat-title {
  color: var(--tt-dark);
  font-family: var(--tt-font-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  padding: 0 0 0.4rem 0.55rem;   /* 0.55rem matches .tt-mega-item's own padding,
                                    so the heading starts on the same optical
                                    left edge as the module names beneath it. */
  border-bottom: 1px solid rgba(var(--tt-primary-rgb), 0.18);
}

/* Desktop only, as specified. Below 992px this panel is an accordion inside
   the drawer, already two levels deep (Solutions -> HRMS -> modules); a third
   level of headings there is chrome on a list the visitor has already narrowed
   twice. The grouping still applies - the three blocks simply run together as
   one stacked list. Delete this block to show them on mobile too. */
@media (max-width: 991.98px) {
  .tt-mega-cat-title { display: none; }
  .tt-mega-cat + .tt-mega-cat { margin-top: 0; }
}

/* --- 5. ITEMS --- */
.tt-mega-item {
  align-items: center;
  border-radius: 12px;
  display: flex;
  gap: 0.6rem;
  padding: 0.42rem 0.55rem;
  text-decoration: none;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.tt-mega-item:hover,
.tt-mega-item:focus-visible {
  background-color: rgba(var(--tt-primary-rgb), 0.08);
  transform: translateX(2px);
}

/* The module icons are a multicolour PNG set. Each sits in a white tile with an
   orange outline so the grid reads as one system without recolouring the art. */
.tt-mega-item-icon {
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--tt-primary);
  border-radius: 8px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 30px;
  justify-content: center;
  transition: background-color 0.18s ease, border-color 0.18s ease;
  width: 30px;
}

.tt-mega-item:hover .tt-mega-item-icon {
  background: #ffffff;
  border-color: var(--tt-primary);
}

.tt-mega-item-icon img {
  height: 17px;
  object-fit: contain;
  width: 17px;
}

.tt-mega-item:hover .tt-mega-item-title {
  color: var(--tt-primary);
}

.tt-mega-item-title {
  color: var(--tt-dark);
  display: block;
  font-family: var(--tt-font-primary);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- 6. RIGHT RAIL --- */
.tt-mega-rail {
  background:
    rgba(240, 237, 233, 0.9);
  border-left: 1px solid rgba(var(--tt-primary-rgb), 0.12);
  display: flex;
  flex-direction: column;
  /* TOP-ALIGNED, NOT CENTRED. This was `center`, which worked only while the
     rail held four device rows and was nearly as tall as the module grid
     beside it. The 2026-09-21 merge of the fingerprint, face and RFID pages
     took it to two rows, and centring a short column inside a tall one pushed
     the "Biometric Devices" heading a long way down the panel - level with the
     middle of the module list rather than with its top.

     1.9rem is the same top padding .tt-mega-main carries, so flex-start puts
     the rail heading on exactly the same line as the first module row. If the
     device list ever grows back, this still holds; centring did not. */
  justify-content: flex-start;
  padding: 1.9rem var(--tt-mega-gutter) 1.9rem clamp(1.25rem, 2vw, 2rem);
}

/* NO `margin-bottom: auto` HERE. It was added on 2026-09-21 to pin the Contact
   Sales button to the rail's bottom edge, back when the device list was two
   rows and the button would otherwise have floated under a stub of content.

   An auto margin absorbs ALL the column's leftover height into one gap, and
   once the list went back to four rows plus the video that gap became the most
   obvious thing in the panel - a band of empty rail between the video box and
   the button. The rail is shorter than the module grid beside it, so there is
   always slack to absorb; the question is only where it goes.

   Without it the button sits a fixed distance under the video and the slack
   collects at the bottom of the column, where it reads as padding rather than
   as a hole. Do not put the auto margin back to "balance" the rail - that is
   the gap this removed. */
.tt-mega-promo {
  margin-bottom: 0;
}

/* Device list: same icon-tile + name + one-liner shape as the module rows, so
   the rail reads as part of the same system rather than a separate widget. */
.tt-mega-devices {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-bottom: 0.6rem;
}

.tt-mega-device {
  align-items: center;
  border-radius: 10px;
  display: flex;
  gap: 0.65rem;
  padding: 0.45rem 0.5rem;
  text-decoration: none;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.tt-mega-device:hover {
  background-color: rgba(var(--tt-primary-rgb), 0.1);
  transform: translateX(2px);
}

/* Glyphs rather than photos - there are no device images in assets/ yet. When
   real product shots land, this tile takes an <img> without other changes. */
.tt-mega-device-icon {
  align-items: center;
  background: rgba(var(--tt-primary-rgb), 0.1);
  border: 1px solid rgba(var(--tt-primary-rgb), 0.18);
  border-radius: 9px;
  color: var(--tt-primary);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.85rem;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.tt-mega-device-icon img {
  height: 20px;
  object-fit: contain;
  width: 20px;
}

.tt-mega-device-text {
  display: block;
  min-width: 0;
}

.tt-mega-device-name {
  color: var(--tt-dark);
  display: block;
  font-size: 0.87rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.tt-mega-device:hover .tt-mega-device-name {
  color: var(--tt-primary);
}

.tt-mega-device-spec {
  color: var(--tt-muted);
  display: block;
  font-size: 0.76rem;
  line-height: 1.4;
}

.tt-mega-promo-media {
  border-radius: 14px;
  display: block;
  overflow: hidden;
  position: relative;
}

/* 16/9 matches the source video, so nothing is cropped and the box holds its
   height from first paint (before any frame has decoded) rather than jumping.
   The play badge that used to sit here is gone: the clip plays by itself when
   the panel opens, so a play affordance would be misleading. */
.tt-mega-promo-media img,
.tt-mega-promo-video {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  width: 100%;
}

.tt-mega-rail-heading {
  color: var(--tt-dark);
  font-family: var(--tt-font-secondary);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
  padding-left: 0.5rem;
}

.tt-mega-rail-cta {
  margin-top: 1.4rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  text-align: center;
}

/* --- 7. FOOTER STRIP --- */
.tt-mega-foot {
  align-items: center;
  background: rgba(246, 244, 241, 0.8);
  border-top: 1px solid rgba(var(--tt-primary-rgb), 0.12);
  display: flex;
  flex: 0 0 auto;
  gap: 1.2rem;
  justify-content: space-between;
  padding: 0.9rem var(--tt-mega-gutter);
  position: relative;
}

.tt-mega-foot-badges {
  color: var(--tt-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.8rem;
  gap: 1.3rem;
}

.tt-mega-foot-badges i {
  color: var(--tt-primary);
  margin-right: 0.35rem;
}

/* The two hub pages (HRMS / ERP). Navigation, not decoration - see the HUBS
   array in mega-menu.js for why they earn a slot of their own. */
.tt-mega-foot-hubs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tt-mega-hub {
  align-items: center;
  border: 1px solid rgba(var(--tt-primary-rgb), 0.18);
  border-radius: var(--tt-radius-sm, 0.5rem);
  color: inherit;
  display: inline-flex;
  gap: 0.55rem;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  transition: background 0.2s var(--tt-ease, ease), border-color 0.2s var(--tt-ease, ease);
}

.tt-mega-hub:focus-visible {
  background: rgba(var(--tt-primary-rgb), 0.08);
  border-color: rgba(var(--tt-primary-rgb), 0.4);
  color: inherit;
}

/* Hover split out and pointer-gated. `color: inherit` here outranks the
   drawer's own `.tt-mega-hub` colour override on specificity, so on a touch
   screen - where a tap applies :hover and never removes it - this rule was
   able to put the hub label back to near-black-on-near-black after the fix
   below had made it readable. */
@media (hover: hover) and (pointer: fine) {
  .tt-mega-hub:hover {
    background: rgba(var(--tt-primary-rgb), 0.08);
    border-color: rgba(var(--tt-primary-rgb), 0.4);
    color: inherit;
  }
}

.tt-mega-hub i {
  color: var(--tt-primary);
  font-size: 0.95rem;
}

.tt-mega-hub-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.tt-mega-hub-name {
  font-size: 0.85rem;
  font-weight: 700;
}

.tt-mega-hub-desc {
  color: var(--tt-muted);
  font-size: 0.73rem;
}

/* --- 8. RESPONSIVE ---
   The rail is the part that has to give first: it is a fixed-purpose column
   competing with the module grid for a shrinking row. Order of concessions as
   the viewport narrows: rail narrows (clamp) -> rail contents shrink -> grid
   drops columns -> rail unstacks below the grid -> promo media is dropped. */
@media (max-width: 1199.98px) {
  /* At this width the rail is down to its ~255px floor, so its own contents
     step down rather than letting the device rows dictate the column width. */
  .tt-mega-device-name {
    font-size: 0.83rem;
  }

  .tt-mega-device-spec {
    font-size: 0.73rem;
  }

  .tt-mega-device-icon {
    height: 29px;
    width: 29px;
  }

  .tt-mega-rail-heading {
    font-size: 0.92rem;
  }

  .tt-mega-item-title {
    font-size: 0.83rem;
  }
}

/* --- 9. MOBILE: INLINE ACCORDION ---
   Below the navbar breakpoint mega-menu.js moves each panel inside its own
   <li>, and the panel stops being a positioned sheet entirely: no fixed
   placement, no measured header offset, no transform. It is a plain block that
   expands under its nav link inside the drawer's own scroll. */
@media (max-width: 991.98px) {
  /* ================================================================
     The mobile nav is a DARK right-hand drawer (see style.css), so every
     panel that expands inside it has to flip to the dark treatment -
     otherwise a white accordion opens inside a near-black drawer.

     Icons are also suppressed at this width. In the desktop mega panel the
     module icons carry meaning across a wide 3-column grid; in a 340px
     drawer they only shrink the room left for the label and make a plain
     list look busy. Labels alone read better on a phone.
     ================================================================ */
  .tt-mega-item-icon,
  .tt-mini-item-icon,
  .tt-mega-device-icon { display: none !important; }

  .tt-mega-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    box-shadow: none;
    display: none;
    inset: auto;
    margin: 0.5rem 0 0.35rem;
    max-height: none;
    position: static;
    transform: none;
    width: 100%;
  }

  /* display, not opacity/visibility: an accordion has to actually leave the
     flow when closed or it holds open a gap in the drawer. */
  .tt-mega-panel.is-open {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .tt-mega-panel::before {
    display: none;
  }

  /* The mini dropdown becomes an accordion too - same reasoning as the mega
     panel, and an absolutely positioned popover inside a scrolling drawer
     would sit over the links below it rather than pushing them down. */
  .tt-mini-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    box-shadow: none;
    display: none;
    left: auto;
    margin: 0.15rem 0 0.5rem;
    min-width: 0;
    opacity: 1;
    pointer-events: auto;
    position: static;
    top: auto;
    transform: none;
    visibility: visible;
    width: 100%;
  }

  /* Text inside both panels, flipped for the dark drawer. These all default to
     var(--tt-dark) - near-black on a near-black panel, i.e. invisible. The
     group headings ("HCM 25", "ERP & CRM 12") were the visible casualty. */
  .tt-mini-item,
  .tt-mega-item,
  .tt-mega-item-title,
  .tt-mega-group-title,
  .tt-mega-group-name { color: rgba(255, 255, 255, 0.92); }

  /* THE TWO HUB BUTTONS (HRMS / ERP) NEED THIS TOO - they were the last
     casualty of the same bug as the group headings above.
     `.tt-mega-hub` is `color: inherit`, not brand orange (only its icon is
     orange), so in the dark drawer it inherited var(--tt-dark) and painted
     near-black on near-black: rendered, laid out, tappable, and completely
     invisible. .tt-mega-hub-desc's var(--tt-muted) failed the same way.
     The foot strip is kept on mobile deliberately (see the .tt-mega-foot
     block further down) because these two links are the drawer's ONLY route
     to the money pages - so they have to be readable, not just present. */
  .tt-mega-hub,
  .tt-mega-hub-name { color: rgba(255, 255, 255, 0.92); }

  .tt-mega-hub-desc { color: rgba(255, 255, 255, 0.62); }

  .tt-mega-hub {
    border-color: rgba(255, 255, 255, 0.16);
  }

  .tt-mega-hub:focus-visible {
    background: rgba(var(--tt-primary-rgb), 0.16);
    border-color: rgba(var(--tt-primary-rgb), 0.5);
    color: #fff;
  }

  /* Focus only. A tapped row keeps :hover on touch screens until something
     else is tapped, which left items highlighted with no pointer present.
     Hover is restored just below for devices that actually have one. */
  .tt-mini-item:focus-visible,
  .tt-mega-item:focus-visible,
  .tt-mega-device:focus-visible {
    background: rgba(var(--tt-primary-rgb), 0.16);
    color: #fff;
  }

  @media (hover: hover) {
    .tt-mini-item:hover,
    .tt-mega-item:hover,
    .tt-mega-device:hover {
      background: rgba(var(--tt-primary-rgb), 0.16);
      color: #fff;
    }
  }

  .tt-mega-item-desc { color: rgba(255, 255, 255, 0.55); }

  .tt-mini-panel.is-open {
    display: block;
    transform: none;
  }

  .tt-mini-panel::before {
    display: none;
  }

  .tt-mini-item {
    min-height: 44px;
  }

  .tt-mega-body {
    display: block;
    overflow-y: visible;
  }

  .tt-mega-main {
    padding: 0.9rem 0.85rem;
  }

  /* Back to a single stacked column. BOTH resets are required: with the
     desktop rule's `grid-auto-flow: column` and its row track left in place,
     a 1fr grid would fill 9 rows and then spill into IMPLICIT extra columns
     off the side of the drawer instead of stacking. Row flow with no row
     track is what makes the phone read the array in plain order - which is
     the same order the desktop columns are filled in. */
  .tt-mega-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }

  .tt-mega-item {
    padding: 0.55rem 0.5rem;
  }

  .tt-mega-item-icon {
    border-radius: 8px;
    height: 32px;
    width: 32px;
  }

  .tt-mega-item-icon img {
    height: 18px;
    width: 18px;
  }

  .tt-mega-item-title {
    font-size: 0.9rem;
  }

  /* Second accordion level. Solutions opens to just these two rows; tapping
     one expands its module list and collapses the other (see wireGroups). */
  .tt-mega-group + .tt-mega-group {
    margin-top: 0.35rem;
  }

  .tt-mega-group-title {
    background: rgba(var(--tt-primary-rgb), 0.06);
    border: 1px solid rgba(var(--tt-primary-rgb), 0.14);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    margin-bottom: 0;
    min-height: 46px;
    padding: 0.5rem 0.75rem;
  }

  .tt-mega-group.is-open .tt-mega-group-title {
    background: rgba(var(--tt-primary-rgb), 0.12);
    border-color: rgba(var(--tt-primary-rgb), 0.28);
  }

  /* The desktop underline would read as a stray dash inside a button-like row. */
  .tt-mega-group-title::after {
    display: none;
  }

  .tt-mega-group-caret {
    display: inline-block;
    font-size: 0.72rem;
    margin-left: auto;
    opacity: 0.6;
    transition: transform 0.22s ease;
  }

  .tt-mega-group.is-open .tt-mega-group-caret {
    transform: rotate(180deg);
  }

  /* The module list itself is the third level - hidden until its group opens. */
  .tt-mega-grid {
    display: none;
  }

  .tt-mega-group.is-open .tt-mega-grid {
    display: grid;
    padding: 0.4rem 0 0.2rem;
  }

  /* The whole rail goes. The device categories now have their own top-level
     "Biometric Devices" row in the drawer (injected by mega-menu.js), so
     keeping them here as well would list them twice, two taps apart. The
     rail's other contents do not belong in a drawer anyway: a large video that
     cannot autoplay usefully, and a CTA duplicating the drawer's own
     "Contact Sales" a few rows below. */
  .tt-mega-rail {
    display: none;
  }
  .tt-mega-foot {
    background: none;
    border-radius: 0;
    padding: 0.2rem 0.85rem 0.9rem;
  }

  /* Trust badges are page-level reassurance, not navigation, so they still go.
     The strip itself now STAYS: it carries the two hub links, which are real
     destinations and the drawer's only route to them. (Before the hubs existed
     the badges were its only content, so the whole strip was hidden here.) */
  .tt-mega-foot-badges {
    display: none;
  }

  .tt-mega-foot-hubs {
    width: 100%;
  }

  .tt-mega-hub {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tt-mega-panel,
  .tt-mega-item,
  .tt-mega-caret {
    transition: none;
  }

  .tt-mega-item:hover {
    transform: none;
  }
}

/* External-destination marker on a mini-menu row (e.g. the careers portal,
   which lives on a different host). */
.tt-mini-item-ext {
  margin-left: auto;
  font-size: 0.68rem;
  opacity: 0.5;
}
.tt-mini-item:hover .tt-mini-item-ext { opacity: 0.9; }

/* The mobile-only "Biometric Devices" nav item (injected by mega-menu.js).
   On desktop the categories live in the Solutions mega panel's rail, so this
   row must not appear there. */
.tt-nav-mobile-only { display: none; }
@media (max-width: 991.98px) {
  .tt-nav-mobile-only { display: block; }
}


/*==================================================================
  9. AI AGENTS PANEL  (data-mega-panel="aiagents")
==================================================================
  A second mega variant. It reuses the shell - .tt-mega-panel, -body,
  -main, -foot all apply - so only the body of the panel is styled here,
  plus ONE structural override.

  THE OVERRIDE, and the bug it fixes (2026-08-27). .tt-mega-body is a
  two-column grid: content, then a track sized for the Solutions panel's
  device rail (`calc(var(--tt-mega-rail-w) + var(--tt-mega-gutter))`).
  This panel has no rail. That track was therefore reserved and left
  empty - on a 1920px screen about 680px of blank panel sitting to the
  right of three cards squeezed into the remainder. The panel did not
  look designed, it looked broken, which is exactly what it was.
  Collapse the body to one column here, and give .tt-mega-main the
  gutter on its right edge so the content still lines up with the page's
  1320px column on both sides.
  If this panel is ever given a rail, delete the override with it.

  DELIBERATELY NO GRADIENT, NO GLOW, NO SECOND ACCENT. Hard rule 3
  allows brand orange and flat fills only, and the category's usual
  neon-purple vocabulary is not available. The AI character comes from
  things the rule permits: scale (an icon tile the module rows never
  use), a hard-stop dot grid behind the head - explicitly exempted, it
  is a pattern and not a gradient - and a sparkle mark and hover arrow
  drawn as inline SVG in mega-menu.js.

  Three cards on desktop, stacking below 992px where the panel becomes
  an in-drawer accordion.
==================================================================*/

/* --- the nav trigger ---
   A small filled dot before the label, so "AI Agents" reads as the one
   new thing in a row of six otherwise identical items. Deliberately a
   CSS shape and not a FontAwesome glyph: FA loads non-blocking, so an
   icon here would arrive late and nudge the whole nav sideways. This is
   painted with the first frame and reserves its own space.

   It lives in mega-menu.css rather than style.css because everything
   else about this nav item is here, and ::after on .nav-link is already
   taken by the hover underline. */
.tt-navbar .nav-item[data-mega="aiagents"] > .nav-link::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 0.45rem;
  vertical-align: 0.15em;
  border-radius: 50%;
  background-color: var(--tt-primary);
  opacity: 0.75;
  transition: opacity 0.2s var(--tt-ease, ease);
}

.tt-navbar .nav-item[data-mega="aiagents"] > .nav-link:hover::before,
.tt-navbar .nav-item[data-mega="aiagents"] > .nav-link.active::before,
.tt-navbar .nav-item[data-mega="aiagents"].is-mega-open > .nav-link::before {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .tt-navbar .nav-item[data-mega="aiagents"] > .nav-link::before {
    transition: none;
  }
}

/* --- the structural override --- */
.tt-mega-panel-agents .tt-mega-body {
  grid-template-columns: minmax(0, 1fr);
}

.tt-mega-panel-agents .tt-mega-main {
  padding-right: var(--tt-mega-gutter);
}

/* --- head --- */

/* The dot grid on ::before is the panel's one piece of "this is the AI
   section" texture. Hard stops, so it is a pattern rather than a
   gradient (see hard rule 3), in brand orange at 24% alpha and masked
   away towards the right so it never competes with the copy over it. */
.tt-mega-agents-head {
  margin-bottom: 1.35rem;
  padding: 1.1rem 1.25rem;
  position: relative;
  border: 1px solid rgba(var(--tt-primary-rgb), 0.14);
  border-radius: var(--tt-radius-sm, 0.5rem);
  background-color: rgba(var(--tt-primary-rgb), 0.04);
}

/* The dots live on a pseudo-element, NOT on .tt-mega-agents-head itself.
   A mask applies to an element's whole rendered subtree, so masking the
   head directly fades the kicker and the lead along with the pattern.
   Masking a separate background layer is the only way to fade one and
   not the other. */
.tt-mega-agents-head::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image: radial-gradient(
    rgba(var(--tt-primary-rgb), 0.24) 1px,
    transparent 1.2px
  );
  background-size: 14px 14px;
  background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 20%, rgba(0, 0, 0, 0.06) 62%);
          mask-image: linear-gradient(to right, #000 0%, #000 20%, rgba(0, 0, 0, 0.06) 62%);
}

.tt-mega-agents-head > * {
  position: relative;
}

.tt-mega-agents-kicker {
  align-items: center;
  color: var(--tt-primary);
  display: inline-flex;
  font-family: var(--tt-font-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  gap: 0.4rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Sized in the SVG attributes too, so it holds its space with no CSS. */
.tt-mega-agents-spark {
  flex: 0 0 auto;
}

.tt-mega-agents-lead {
  color: var(--tt-muted);
  font-size: 0.95rem;
  margin: 0.4rem 0 0;
  max-width: 62ch;
}

/* --- the three agent cards --- */

.tt-mega-agents-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.tt-mega-agent {
  align-items: flex-start;
  background: rgba(var(--tt-primary-rgb), 0.03);
  border: 1px solid rgba(var(--tt-primary-rgb), 0.14);
  border-radius: var(--tt-radius-sm, 0.5rem);
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.25rem 1.2rem 1.15rem;
  position: relative;
  text-decoration: none;
  transition: background 0.2s var(--tt-ease, ease),
              border-color 0.2s var(--tt-ease, ease),
              box-shadow 0.2s var(--tt-ease, ease),
              transform 0.2s var(--tt-ease, ease);
}

.tt-mega-agent:hover,
.tt-mega-agent:focus-visible {
  background: rgba(var(--tt-primary-rgb), 0.08);
  border-color: rgba(var(--tt-primary-rgb), 0.4);
  box-shadow: 0 10px 24px -14px rgba(var(--tt-primary-rgb), 0.6);
  transform: translateY(-2px);
}

/* Keyboard users get the same affordance as the mouse, plus a real ring. */
.tt-mega-agent:focus-visible {
  outline: 2px solid var(--tt-primary);
  outline-offset: 2px;
}

/* The one piece of deliberate scale. Module rows use a 1.5rem inline
   icon; this is a 2.6rem tile, which is what makes the panel read as
   a different class of thing without introducing a new colour. The
   halo is a flat ring, not a glow - it just detaches the tile from the
   card so the three read as instruments rather than list bullets. */
.tt-mega-agent-icon {
  align-items: center;
  background: var(--tt-primary);
  border-radius: var(--tt-radius-sm, 0.5rem);
  box-shadow: 0 0 0 4px rgba(var(--tt-primary-rgb), 0.1);
  color: #fff;
  display: inline-flex;
  font-size: 1.05rem;
  height: 2.6rem;
  justify-content: center;
  margin-bottom: 0.85rem;
  transition: box-shadow 0.2s var(--tt-ease, ease);
  width: 2.6rem;
}

.tt-mega-agent:hover .tt-mega-agent-icon,
.tt-mega-agent:focus-visible .tt-mega-agent-icon {
  box-shadow: 0 0 0 6px rgba(var(--tt-primary-rgb), 0.16);
}

.tt-mega-agent-name {
  color: var(--tt-dark);
  font-family: var(--tt-font-primary);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.tt-mega-agent-desc {
  color: var(--tt-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

/* "This is a link" affordance, top-right so it never collides with the
   two lines of copy however they wrap. Present at low opacity rather
   than absent, so the card does not change height or gain an element on
   hover - a touch device, which never hovers, still sees it. */
.tt-mega-agent-go {
  align-items: center;
  color: var(--tt-primary);
  display: inline-flex;
  opacity: 0.35;
  position: absolute;
  right: 1rem;
  top: 1.15rem;
  transition: opacity 0.2s var(--tt-ease, ease),
              transform 0.2s var(--tt-ease, ease);
}

.tt-mega-agent:hover .tt-mega-agent-go,
.tt-mega-agent:focus-visible .tt-mega-agent-go {
  opacity: 1;
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .tt-mega-agent,
  .tt-mega-agent-icon,
  .tt-mega-agent-go { transition: none; }
  .tt-mega-agent:hover,
  .tt-mega-agent:focus-visible { transform: none; }
  .tt-mega-agent:hover .tt-mega-agent-go,
  .tt-mega-agent:focus-visible .tt-mega-agent-go { transform: none; }
}

/* Below the navbar breakpoint the panel is inside the drawer, where a
   three-column grid would be three unreadable slivers. The head's dot
   grid and padding go too - in a drawer that is a box inside a box. */
@media (max-width: 991.98px) {
  .tt-mega-agents-grid { grid-template-columns: 1fr; }
  .tt-mega-agents-head {
    background-color: transparent;
    border: 0;
    margin-bottom: 0.9rem;
    padding: 0;
  }
  .tt-mega-agents-head::before { display: none; }
  .tt-mega-agents-lead { font-size: 0.9rem; }
  .tt-mega-agent { padding: 0.9rem 2.4rem 0.9rem 0.9rem; }
  .tt-mega-agent-icon {
    box-shadow: none;
    height: 2.1rem;
    margin-bottom: 0.5rem;
    width: 2.1rem;
  }
  .tt-mega-agent-go { right: 0.85rem; top: 0.95rem; }
}