/* =============================================================
   PaystubX — Responsive Fix (added: local dev pass)
   Load order: LAST — safe to override existing styles.
   All rules are targeted; nothing is global-reset.
   ============================================================= */

/* ================================================================
   0. SITE HEADER  –  clean, professional, sticky navbar
   No legacy navbar elements remain in the Blade. All old .navbar,
   .openbtn, and .sidenav rules from newstyle.css are neutralised
   here with higher-specificity or !important overrides.
   ================================================================ */

/* ── Kill legacy elements that newstyle.css tries to show ── */
.openbtn,
div.openbtn                         { display: none !important; }
ul.nav.nav-justified.navbar         { display: none !important; margin: 0 !important; }

/* ── Header bar ──
   Sticky at top so nav freezes on scroll (verify banner stays in normal flow
   above the header when shown; when verified/dismissed it takes no space).
   z-index: 1300 keeps the header (and its dropdown menus) above page banners.
   Bootstrap modal backdrop (1040) and modal (1050) are raised below to
   stay above the header. */
.site-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1300;
    background: #ffffff;
    border-bottom: none;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.05);
}

/* Keep Bootstrap modals above the header */
.modal-backdrop { z-index: 1310 !important; }
.modal          { z-index: 1320 !important; }

/* Inner wrapper: 1500px matches the page body max-width so logo
   left-edge lines up perfectly with content sections below */
.site-header__inner {
    display: flex;
    align-items: center;
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
    height: 80px;
    gap: 0;
}

/* ── Logo + PX cube brand cluster ── */
.psx-brand-cluster {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: clamp(2px, 0.35vw, 5px);
}

.site-header__brand {
    padding-left: 15px;
}

/* ── Logo – left-aligned ── */
/* Nudge 15px right: header inner has 30px left padding but hero text inside a Bootstrap col
   gets an additional 15px column padding, so both land at 45px from the viewport edge. */
.site-header__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    text-decoration: none !important;
    margin-right: 0;
    padding-left: 0;
}

.site-header__logo img {
    width: clamp(148px, 16vw, 200px);
    max-width: 200px;
    height: auto;
    max-height: 44px;
    display: block;
    object-fit: contain;
}

/* ── Desktop nav – centered between logo and login ── */
.site-header__nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
    margin: 0 16px;
    flex-wrap: nowrap;
}

/* Base link — professional nav typography */
.site-header__link {
    position: relative;
    display: inline-block;
    font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont,
                 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #334155;
    text-decoration: none !important;
    padding: 8px 13px;
    border-radius: 8px;
    white-space: nowrap;
    letter-spacing: 0.015em;
    transition: color 0.2s ease, background-color 0.2s ease;
    border: none !important;
    box-shadow: none !important;
    background-color: transparent;
    line-height: 1.35;
}

/* Animated underline bar */
.site-header__link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    right: 50%;
    height: 2px;
    background: #1e4976;
    border-radius: 2px;
    transition: left 0.22s ease, right 0.22s ease;
}

.site-header__link:hover {
    color: #1e4976;
    background-color: rgba(30, 73, 118, 0.06);
    text-decoration: none !important;
}

.site-header__link:hover::after {
    left: 12px;
    right: 12px;
}

.site-header__link.is-active {
    color: #1e4976;
    background-color: rgba(30, 73, 118, 0.08);
    font-weight: 700;
}

.site-header__link.is-active::after {
    left: 10px;
    right: 10px;
}

/* Pricing — pill button, distinct from regular links */
.site-header__link--pricing {
    color: #b91c1c !important;
    background-color: transparent !important;
    border: 2px solid #b91c1c !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    margin-left: 4px;
    font-weight: 700;
    font-size: 17px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease !important;
}

.site-header__link--pricing::after { display: none; } /* no underline on pill */

.site-header__link--pricing:hover,
.site-header__link--pricing.is-active {
    background-color: #b91c1c !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    text-decoration: none !important;
}

/* ── Auth area ── */
.site-header__auth {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.site-header__login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #d32f0c;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    padding: 9px 26px;
    border-radius: 8px;
    border: 2px solid #d32f0c;
    text-decoration: none !important;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.2px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(211,47,12,0.25);
}

.site-header__login-btn:hover {
    background: #b02509;
    border-color: #b02509;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(211,47,12,0.35);
}

.site-header__login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(211,47,12,0.2);
}

/* Outlined Sign In (quiet contrast against the red Sign Up) */
.site-header__login-btn--outline {
    background: #ffffff;
    color: #0f2a6b !important;
    border-color: #0f2a6b;
    box-shadow: none;
}

.site-header__login-btn--outline:hover {
    background: #f3f6ff;
    color: #0f2a6b !important;
    border-color: #0f2a6b;
    box-shadow: none;
    transform: translateY(-1px);
}

.site-header__user-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(6px, 1.5vw, 12px);
    flex-wrap: nowrap;
    min-width: 0;
}

/* Kill legacy offsets; lock avatar box so flex never squishes it (was stretching img width:100%) */
.site-header__user-menu .user-icon,
.site-header__user-menu .logout {
    position: static !important;
    top: auto !important;
    left: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.site-header__user-menu .user-icon {
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    overflow: hidden !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
}

.site-header__user-menu .user-icon img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center center !important;
    border: 2px solid #e8e8e8 !important;
    transition: border-color 0.2s !important;
    display: block !important;
}

.site-header__user-menu .user-icon img:hover { border-color: #1a6a8a !important; }

.site-header__user-menu .logout {
    flex: 0 0 auto !important;
    width: 32px !important;
    height: 32px !important;
}

.site-header__user-menu .logout img {
    width: 28px !important;
    height: 28px !important;
    max-width: none !important;
    object-fit: contain !important;
    display: block !important;
    cursor: pointer !important;
}

/* newstyle .dropbtn { width:100% } blows up the greeting pill inside flex — hug content instead */
.site-header__user-menu .dropbtn {
    width: auto !important;
    max-width: min(280px, 58vw) !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    margin-right: 0 !important;
    padding: 4px 10px 4px 12px !important;
}

.site-header__user-menu .dropbtn .navright-btn {
    font-size: clamp(13px, 1.1vw, 15px) !important;
    padding: 6px 10px !important;
    white-space: nowrap !important;
}

@media (max-width: 1100px) {
    .site-header__user-menu .user-icon {
        flex: 0 0 34px !important;
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        max-width: 34px !important;
    }
    .site-header__user-menu .dropbtn {
        max-width: min(240px, 50vw) !important;
    }
}

/* ── Hamburger button (hidden on desktop) ──
   SVG icon (not empty spans) so bars always paint on iOS.
   Keep above the sidenav overlay so a second tap can toggle-close. */
.site-header__burger {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
    position: relative;
    z-index: 1301;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #0b1726;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    -webkit-appearance: none;
}

.site-header__burger-icon {
    display: block;
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3.25;
    stroke-linecap: round;
    overflow: visible;
}

.site-header__burger .burger-bar {
    transform-box: view-box;
    transform-origin: 12px 12px;
}

.site-header__burger:focus-visible {
    outline: 2px solid #0b1726;
    outline-offset: 2px;
    border-radius: 8px;
}

/* Stay as hamburger bars when open — close via drawer X / overlay / second tap. */
.site-header__burger[aria-expanded="true"] {
    color: #0b1726;
}

/* ================================================================
   MOBILE SIDENAV
   newstyle.css applies: padding-top:60px, .sidenav a{display:block},
   .closebtn{position:absolute}. All overridden below.
   ================================================================ */

/* Full reset of newstyle sidenav for our new structure.
   Slide with transform (not width) so type never squashes while opening. */
#mySidenav.sidenav {
    height: 100% !important;
    height: 100dvh !important;
    width: min(86vw, 320px) !important;
    max-width: 320px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    background-color: #0b1726 !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    padding-top: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    z-index: 400 !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: none;
    transform: translate3d(-105%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.28s !important;
}

/* OPEN state — toggled by JS via classList.add('sidenav--open'). */
#mySidenav.sidenav.sidenav--open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.42) !important;
}

@media (min-width: 600px) and (max-width: 900px) {
    #mySidenav.sidenav {
        width: min(72vw, 360px) !important;
        max-width: 360px !important;
    }
}

/* Sidenav header row (logo + close button) */
.sidenav__header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 16px 14px 18px !important;
    padding-top: max(14px, env(safe-area-inset-top, 0px)) !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    min-height: 64px;
    flex: 0 0 auto;
}

#mySidenav .sidenav__header img {
    width: clamp(132px, 38vw, 158px);
    max-width: 158px;
    height: auto;
    max-height: 36px;
    object-fit: contain;
    display: block;
}

/* Override newstyle's .sidenav a { display:block; font-size:20px } for header links */
#mySidenav .sidenav__header a {
    display: inline-flex !important;
    align-items: center !important;
    font-size: inherit !important;
    padding: 0 !important;
    background: transparent !important;
    color: inherit !important;
}

/* Close button — override newstyle's position:absolute */
#mySidenav .closebtn {
    position: static !important;
    top: unset !important;
    right: unset !important;
    margin-left: 0 !important;
    font-size: 28px !important;
    font-weight: 300;
    line-height: 1 !important;
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
    display: inline-block !important;
}

#mySidenav .closebtn:hover {
    color: #ffffff !important;
    background: transparent !important;
}

/* Sidenav nav links */
.sidenav__links {
    display: flex !important;
    flex-direction: column !important;
    padding: 22px 12px 4px !important;
    flex: 0 0 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

.sidenav__label {
    margin: 10px 10px 6px !important;
    padding: 0 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    color: rgba(255,255,255,0.42) !important;
    line-height: 1.2 !important;
}

.sidenav__link {
    display: flex !important;
    align-items: center !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: rgba(255,255,255,0.88) !important;
    padding: 12px 14px !important;
    min-height: 48px !important;
    text-decoration: none !important;
    border-left: none !important;
    background: transparent !important;
    transition: background-color 0.18s ease, color 0.18s ease !important;
    letter-spacing: 0.01em;
    line-height: 1.25 !important;
    box-shadow: none !important;
    width: auto !important;
    border-radius: 10px !important;
    margin: 2px 0 !important;
    text-align: left !important;
    /* Override body.sidenav-open { touch-action: none } so taps navigate reliably */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    pointer-events: auto;
}

.sidenav__link:hover,
.sidenav__link.is-active {
    background-color: rgba(255,255,255,0.1) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.sidenav__link.is-active {
    background-color: rgba(255, 77, 46, 0.16) !important;
    box-shadow: inset 3px 0 0 #ff4d2e !important;
}

.sidenav__link--pricing {
    color: #ff8a70 !important;
    font-weight: 700 !important;
}

.sidenav__link--pricing:hover,
.sidenav__link--pricing.is-active {
    background-color: rgba(255, 77, 46, 0.16) !important;
    color: #ffb199 !important;
}

/* Sidenav auth — same row, tight under Pricing */
.sidenav__auth {
    padding: 8px 12px 16px !important;
    border-top: 1px solid rgba(255,255,255,0.08) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
    margin-top: 0 !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 2 !important;
}

.sidenav__auth-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    background: #ff4d2e !important;
    color: #ffffff !important;
    text-align: center !important;
    padding: 11px 10px !important;
    min-height: 44px !important;
    border-radius: 12px !important;
    border: 1.5px solid #ff4d2e !important;
    font-weight: 700 !important;
    font-size: 14.5px !important;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

.sidenav__auth-btn:hover {
    background: #e84327 !important;
    border-color: #e84327 !important;
    color: #ffffff !important;
}

.sidenav__auth-btn--outline {
    background: transparent !important;
    color: #ffffff !important;
    border-color: rgba(255,255,255,0.28) !important;
}

.sidenav__auth-btn--outline:hover {
    background: rgba(255,255,255,0.08) !important;
    color: #ffffff !important;
    border-color: rgba(255,255,255,0.55) !important;
}

/* Logged-in mobile sidenav: name pill on top, Logout full-width below.
   Must not beat Bootstrap .d-none — guest markup keeps a hidden .logoutDiv
   in the same drawer, and display:flex !important was stacking it on Sign In. */
#mySidenav .sidenav__auth .sidenav__user:not(.d-none),
#mySidenav .sidenav__auth .logoutDiv:not(.d-none) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    max-width: none !important;
    float: none !important;
}
#mySidenav .sidenav__auth .d-none {
    display: none !important;
}
#mySidenav .sidenav__auth .sidenav__user-menu,
#mySidenav .sidenav__auth .dropbtn {
    position: relative !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    float: none !important;
    overflow: visible !important;
    /* newstyle.css .dropbtn { background-color:#fff } — that white pill */
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: inherit !important;
}
#mySidenav .sidenav__auth .sidenav__user-btn.sidenav__auth-btn,
#mySidenav .sidenav__auth .authUserName.sidenav__auth-btn,
#mySidenav .sidenav__auth button.sidenav__user-btn,
#mySidenav .sidenav__auth button.authUserName {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding: 12px 14px !important;
    white-space: nowrap !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #ffffff !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 1.5px solid rgba(255,255,255,0.28) !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
/* Keep "Hi, First" fully inside the outline pill (no left clip). */
#mySidenav .sidenav__auth .sidenav__user-name {
    display: block !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-align: left !important;
    font-size: inherit !important;
    font-weight: inherit !important;
}
#mySidenav .sidenav__auth .sidenav__user-btn.dropdown-toggle::after,
#mySidenav .sidenav__auth .authUserName.dropdown-toggle::after {
    display: none !important;
    content: none !important;
    margin: 0 !important;
    border: 0 !important;
}
#mySidenav .sidenav__auth .sidenav__user-btn .caret,
#mySidenav .sidenav__auth .authUserName .caret {
    display: inline-block !important;
    width: 0 !important;
    height: 0 !important;
    margin-left: auto !important;
    margin-right: 2px !important;
    flex: 0 0 auto !important;
    vertical-align: middle !important;
    border-top: 6px solid rgba(255, 255, 255, 0.9) !important;
    border-right: 5px solid transparent !important;
    border-left: 5px solid transparent !important;
    border-bottom: 0 !important;
    content: none !important;
}
#mySidenav .sidenav__auth .sidenav__user-btn[aria-expanded="true"] .caret,
#mySidenav .sidenav__auth .authUserName[aria-expanded="true"] .caret {
    border-top: 0 !important;
    border-bottom: 6px solid rgba(255, 255, 255, 0.9) !important;
}
#mySidenav .sidenav__auth .sidenav__user-dropdown,
#mySidenav .sidenav__auth .dropdown-menu {
    display: none !important;
    left: 0 !important;
    right: auto !important;
    top: auto !important;
    bottom: calc(100% + 6px) !important;
    width: 100% !important;
    min-width: 160px !important;
    margin: 0 !important;
    padding: 6px 0 !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 12px !important;
    background: #122033 !important;
    box-shadow: 0 10px 28px rgba(0,0,0,0.35) !important;
    position: absolute !important;
    z-index: 30 !important;
    float: none !important;
}
#mySidenav .sidenav__auth .sidenav__user-dropdown.show,
#mySidenav .sidenav__auth .dropdown-menu.show {
    display: block !important;
}
#mySidenav .sidenav__auth .dropdown-menu:before,
#mySidenav .sidenav__auth .dropdown-menu:after {
    display: none !important;
}
#mySidenav .sidenav__auth .dropdown-menu > li > a {
    color: rgba(255,255,255,0.9) !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}
#mySidenav .sidenav__auth .dropdown-menu > li > a:hover {
    background: rgba(255,255,255,0.08) !important;
    color: #ffffff !important;
}
/* Logout = same solid orange shell as Sign Up (kill legacy double-border) */
#mySidenav .sidenav__auth .sidenav__logout-btn.sidenav__auth-btn,
#mySidenav .sidenav__auth button.sidenav__logout-btn,
#mySidenav .sidenav__auth button.logout-btn {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    background: #ff4d2e !important;
    border: 1.5px solid #ff4d2e !important;
    color: #ffffff !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    cursor: pointer !important;
}
#mySidenav .sidenav__auth .sidenav__logout-btn.sidenav__auth-btn:hover,
#mySidenav .sidenav__auth button.sidenav__logout-btn:hover,
#mySidenav .sidenav__auth button.logout-btn:hover {
    background: #e84327 !important;
    border-color: #e84327 !important;
    color: #ffffff !important;
}
#mySidenav .sidenav__auth .logout,
#mySidenav .sidenav__auth .btn-logout {
    position: static !important;
    top: auto !important;
    left: auto !important;
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
}

/* Overlay dim when sidenav is open.
   <button> element so iOS Safari always fires click events (divs are unreliable).
   inset replaced with explicit directions for iOS < 14.5 compatibility. */
.sidenav-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 10, 18, 0.58);
    z-index: 350;
    cursor: pointer;
    border: none;
    padding: 0;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.sidenav-overlay--visible {
    display: block;
}

/* X close button inside the sidenav header */
.sidenav__close-btn {
    background: rgba(255,255,255,0.08) !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    color: #ffffff !important;
    font-size: 18px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    opacity: 0.95;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    min-height: 40px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 999px !important;
}
.sidenav__close-btn:hover,
.sidenav__close-btn:active {
    opacity: 1 !important;
    color: #ffffff !important;
    background: rgba(255,255,255,0.16) !important;
}

/* ── Medium screens: tighter nav for extra items ── */
@media (max-width: 1200px) and (min-width: 901px) {
    .site-header__nav {
        margin: 0 8px;
        gap: 0;
    }
    .site-header__link {
        font-size: 16.5px;
        padding: 8px 10px;
    }
    .site-header__link--pricing {
        padding: 5px 12px !important;
        font-size: 16px;
    }
}

/* Lock background scroll while mobile menu is open.
   touch-action:none stays on body only — sidenav links set touch-action:manipulation
   so region/explore taps are not blocked by the scroll lock. */
body.sidenav-open {
    overflow: hidden !important;
    touch-action: none;
    overscroll-behavior: none;
}
body.sidenav-open #mySidenav.sidenav {
    touch-action: pan-y;
}

/* Ensure newstyle's media queries don't re-show old .sidenav / .openbtn */
@media (max-width: 768px) {
    .openbtn       { display: none !important; }
    .toggle-logo   { display: none !important; }
}

/* Remove any gap between header and first content section */
.site-header + * { margin-top: 0 !important; }
.paystub { margin-top: 0 !important; }

/* Canada landing hero uses same gradient as USA home (.paystub); keep copy readable */
.canada-hero .canadaheading,
.canada-hero .can-p,
.canada-hero .can-p1 {
    color: #fff !important;
}
.canada-hero .can-p1 {
    opacity: 0.92;
}

/* Canada page — match home section bg (#fafafa, same as .ready-explore-section) */
.canada-body-section,
.canada-soft-bg {
    background-color: #fafafa;
}

/* Home .Generate uses display:table-cell; center it in Canada flex wrappers */
.canada-hero .d-flex.justify-content-center .Generate,
.canada-body-section .oo.d-flex.justify-content-center .Generate {
    display: inline-block !important;
}

.canada-soft-bg.d-flex.justify-content-center .Generate {
    display: inline-block !important;
}

/* UK / Global landings — same hero gradient + light section bands as Canada */
.uk-hero .mainhead,
.uk-hero .Payslips {
    color: #fff !important;
}
.global-hero .globe-p,
.global-hero .PayslipsGlo {
    color: #fff !important;
}
.uk-cta-band .uk-big-heading,
.global-cta-band .global-heading {
    color: #0f1b3d !important;
}

.uk-hero .uk-btn.d-flex .Generate,
.global-hero .globlebtn.d-flex .Generate,
.uk-cta-band .d-flex.justify-content-center .Generate,
.global-cta-band .d-flex.justify-content-center .Generate,
.ukbtn1.d-flex.justify-content-center .Generate {
    display: inline-block !important;
}

.canada-body-section .pt-5.d-flex.justify-content-center .Generate {
    display: inline-block !important;
}

.global-howto-cta.d-flex.justify-content-center .Generate {
    display: inline-block !important;
}

/* Canada / UK / Global — hero shell matches USA home first section:
   .paystub > .container-fluid.px-lg-5 > .row.pb-5 */
.region-landing-hero > .container-fluid > .row {
    align-items: center !important;
}

/* Right-column visuals: same frame proportion as .hero-tpl-frame (820×700) */
.region-hero-visual-frame {
    width: 100%;
    max-width: min(640px, 100%);
    aspect-ratio: 820 / 700;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.region-hero-visual-frame .region-hero-img,
.region-hero-visual-frame .globleImg.region-hero-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block !important;
}

/* Desktop alignment should match home: copy, CTA, and store badges start from the left.
   Mobile/tablet can stay centered for balance. */
@media (min-width: 992px) {
    .region-hero-copy {
        text-align: left !important;
        padding-right: clamp(1rem, 3vw, 3.5rem);
    }
    .region-hero-copy .text-center,
    .region-hero-copy .mainhead,
    .region-hero-copy .globe-p,
    .region-hero-copy .canadaheading,
    .region-hero-copy .Payslips,
    .region-hero-copy .PayslipsGlo {
        text-align: left !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .region-hero-cta,
    .region-hero-badges {
        justify-content: flex-start !important;
    }
    .region-hero-copy .Generate,
    .region-hero-cta .Generate {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .region-hero-copy .top-gogle {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* UK hero only: heading + CTA + store badges share the same left edge as body copy.
   .Payslips has padding-left: 55px in style.css; newstyle clears it at max-width: 1440px.
   .mainhead uses asymmetric padding (4px left) — align both wide and mid desktop. */
@media (min-width: 1441px) {
    .uk-hero.region-landing-hero .region-hero-copy > .text-white:first-child {
        padding-left: 55px;
        box-sizing: border-box;
    }
    .uk-hero.region-landing-hero .region-hero-copy p.mainhead {
        padding-top: 0 !important;
        padding-bottom: 2px !important;
        padding-right: clamp(0.5rem, 4vw, 2.5rem) !important;
        padding-left: 0 !important;
    }
    .uk-hero.region-landing-hero .region-hero-cta,
    .uk-hero.region-landing-hero .region-hero-badges {
        padding-left: 55px;
        box-sizing: border-box;
    }
}

@media (min-width: 992px) and (max-width: 1440px) {
    .uk-hero.region-landing-hero .region-hero-copy p.mainhead {
        padding: 0 clamp(0.5rem, 4vw, 2.5rem) 2px 0 !important;
    }
}

/* UK hero image: slightly larger than the default 640px */
@media (min-width: 992px) {
    .uk-hero-visual.region-hero-visual-frame {
        max-width: min(720px, 100%) !important;
    }
}

/* Global hero — right image column: breathing room so iMac clears the header */
.global-hero.region-landing-hero .global-hero-img-col {
    padding-top: 1.5rem;
    box-sizing: border-box;
}
@media (min-width: 768px) {
    .global-hero.region-landing-hero .global-hero-img-col {
        padding-top: 2.25rem;
    }
}
@media (min-width: 992px) {
    .global-hero.region-landing-hero .global-hero-img-col {
        padding-top: 3rem;
    }
}

/* UK hero — right column (iMac): breathing room below fixed header */
.uk-hero.region-landing-hero .ukimg1 {
    padding-top: 1.5rem;
    box-sizing: border-box;
}
@media (min-width: 768px) {
    .uk-hero.region-landing-hero .ukimg1 {
        padding-top: 2.25rem;
    }
}
@media (min-width: 992px) {
    .uk-hero.region-landing-hero .ukimg1 {
        padding-top: 3rem;
    }
}

/* UK body section: reduce the large paddingleft (240px) so text aligns with the hero copy */
@media (min-width: 992px) {
    .uk-body-row .paddingleft {
        padding-left: 5rem !important;
    }
}

/* UK body row — photo column: generous top inset so subject is not clipped at section top */
.uk-body-row .uk-body-hero-photo-col {
    padding-top: 3.25rem !important;
    box-sizing: border-box;
}
@media (min-width: 992px) {
    .uk-body-row .uk-body-hero-photo-col {
        padding-top: 5rem !important;
    }
}
.uk-body-row .uk-body-hero-photo {
    display: block;
}

/* Canada + Global hero: container gutter matches .site-header__inner (max-width 1500px, 30px sides;
   ≤900px header uses 20px). Overrides Bootstrap .px-lg-5 — one consistent inset, no duplicate copy padding. */
@media (max-width: 900px) {
    .canada-hero.region-landing-hero > .container-fluid,
    .global-hero.region-landing-hero > .container-fluid {
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box;
    }
}

@media (min-width: 901px) {
    .canada-hero.region-landing-hero > .container-fluid,
    .global-hero.region-landing-hero > .container-fluid {
        padding-left: max(30px, calc((100vw - min(100vw, 1500px)) * 0.5 + 30px)) !important;
        padding-right: max(30px, calc((100vw - min(100vw, 1500px)) * 0.5 + 30px)) !important;
        box-sizing: border-box;
    }
}

/* Desktop-only fixes: title widths and heading inset overrides */
@media (min-width: 992px) {
    /* newstyle .canadaheading { max-width: 312px } — full-width title */
    .canada-hero.region-landing-hero .region-hero-copy .canadaheading {
        max-width: none;
    }
    /* newstyle .text-padding adds 30px left inside a breakpoint — container governs on desktop */
    .global-hero.region-landing-hero .region-hero-copy .globe-p {
        padding-left: 0 !important;
    }

    /* Global body left col: align with hero text edge */
    .global-body-row .col-lg-9.global-padding {
        padding-left: 4rem !important;
    }
    .global-body-row .global-padding.mt-5 {
        padding-left: 2rem !important;
    }

    /* Canada hero image: bottom-aligned, right-aligned, slightly larger.
       Column stretches to full row height; flex-end pushes frame to the base of the section.
       margin-bottom: -3rem cancels the row's pb-5 so the image base touches the section edge. */
    .canada-hero.region-landing-hero .col-lg-6:last-child {
        align-self: stretch;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding-bottom: 0 !important;
        margin-bottom: -6rem;
    }
    .canada-hero-visual.region-hero-visual-frame {
        margin-right: 0 !important;
        margin-left: auto !important;
        max-width: min(720px, 100%) !important;
        overflow: visible;
    }
    /* Clip any overflow so image doesn't bleed outside the section */
    .canada-hero.region-landing-hero {
        overflow: hidden;
    }
}

/* Region landing pages (UK, Canada): first block uses Bootstrap .mt-2 —
   remove top gap so hero meets header like the homepage */
#mySidenav + .mt-2 { margin-top: 0 !important; }

/* Global page: modal comes first, then colored hero with .mt-2 */
#mySidenav + .modal + .mt-2 { margin-top: 0 !important; }

/* Pricing and similar: first section flush under header */
#mySidenav + .pricing-coming-soon { margin-top: 0 !important; }

/* ================================================================
   0a. HOME HERO — slow template marquee (PaystubHero-style)
   Text stays on top; templates scroll underneath with left fade.
   ================================================================ */

.paystub.psx-hero-with-marquee {
    /* Vivid brand orange-red: same family for headline + CTA (USA/CA/UK/Global) */
    --psx-hero-accent: #FF4D2E;
    --psx-hero-cta: #FF4D2E;
    --psx-hero-cta-hover: #E84327;
    position: relative;
    overflow: hidden;
    /* Height follows content below desktop; desktop restores min-height at ≥1200 */
    min-height: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Copy shell — desktop overlay positioning restored at ≥1200 */
.psx-hero-shell {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 4vw, 3rem);
    pointer-events: none;
}
.psx-hero-shell .psx-hero-copy,
.psx-hero-shell .psx-hero-copy a {
    pointer-events: auto;
}

.psx-hero-copy {
    position: relative;
    z-index: 5;
    width: min(100%, 440px);
    max-width: 440px;
    margin: 0;
    padding: 0;
    text-align: left;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

.psx-hero-content {
    position: relative;
    z-index: 4;
}

/* Default: in-flow carousel (mobile/tablet). Desktop overlays at ≥1200. */
.psx-hero-marquee {
    position: relative;
    inset: auto;
    z-index: 1;
    width: 100%;
    pointer-events: none;
    overflow: hidden;
}

.psx-hero-marquee__scrim {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    display: none;
    /* Soft left veil for readability — templates stay vivid on ~70% */
    background: linear-gradient(
        90deg,
        #252e58 0%,
        rgba(37, 46, 88, 0.97) 14%,
        rgba(37, 46, 88, 0.78) 24%,
        rgba(99, 97, 211, 0.28) 36%,
        rgba(7, 169, 108, 0.05) 48%,
        rgba(7, 169, 108, 0) 58%
    );
}

.psx-hero-marquee__viewport {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    z-index: 1;
    /* Avoid contain:paint — it can clip/stall GPU transforms + lazy image discovery in some browsers */
}

.psx-hero-marquee__track {
    /* Fallback only — region partial sets the real duration via #track + media queries */
    --psx-marquee-duration: 80s;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    max-width: none;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    /* One linear loop for the whole life of the track — never pause/stop on hover */
    animation: psx-hero-marquee-scroll var(--psx-marquee-duration) linear infinite;
    animation-play-state: running !important;
}
.psx-hero-marquee__track.is-animating {
    animation-play-state: running !important;
}

.psx-hero-marquee__group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    flex: 0 0 auto;
    gap: clamp(1rem, 2vw, 1.75rem);
    padding-right: clamp(1rem, 2vw, 1.75rem);
    box-sizing: content-box;
}

.psx-hero-marquee__card {
    flex: 0 0 auto;
    width: clamp(260px, 26vw, 380px);
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow:
        0 28px 60px rgba(0, 0, 0, 0.38),
        0 8px 20px rgba(0, 0, 0, 0.18);
    transform: translateZ(0);
}

.psx-hero-marquee__card img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: top;
    user-select: none;
    -webkit-user-drag: none;
    /* Reserve space; reduces Firefox layout thrash as images decode */
    aspect-ratio: 640 / 820;
    object-fit: contain;
    background: #fff;
}

@keyframes psx-hero-marquee-scroll {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        /* Two equal groups → -50% is an exact seamless loop (gap lives inside each group) */
        transform: translate3d(-50%, 0, 0);
    }
}

.psx-hero-marquee__card--placeholder {
    background: linear-gradient(160deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.psx-hero-marquee__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: clamp(280px, 32vw, 420px);
    padding: 1.25rem;
    text-align: center;
}

.psx-hero-marquee__placeholder-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.psx-hero-marquee__placeholder-label {
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    font-weight: 700;
    color: #1e293b;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    line-height: 1.3;
}

/* Primary CTA — same accent token as headline */
.psx-hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.4rem;
}
/* Higher specificity than legacy a.btn.Generate / .Generate { display:table-cell|inline-block } */
.paystub .psx-hero-cta-row a.btn.Generate,
.psx-hero-cta-row a.btn.Generate {
    margin: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 280px !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 1.45rem !important;
    font-size: 0.98rem !important;
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    border-radius: 0.55rem !important;
    white-space: nowrap !important;
    text-align: center !important;
    color: #fff !important;
    background-color: var(--psx-hero-cta) !important;
    background-image: none !important;
    border: 1px solid var(--psx-hero-cta) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    box-sizing: border-box !important;
}
.paystub .psx-hero-cta-row a.btn.Generate:hover,
.paystub .psx-hero-cta-row a.btn.Generate:focus,
.psx-hero-cta-row a.btn.Generate:hover,
.psx-hero-cta-row a.btn.Generate:focus {
    background-color: var(--psx-hero-cta-hover) !important;
    background-image: none !important;
    border-color: var(--psx-hero-cta-hover) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}
.psx-hero-cta-secondary { display: none !important; }

/* Store badges — clear secondary gap, not a huge empty band */
.psx-hero-store-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.45rem;
}
.psx-hero-store-row .storbtn {
    margin: 0 !important;
    width: auto !important;
    height: 36px !important;
    display: block;
}

/* ================================================================
   HERO RESPONSIVE SYSTEM
   ≤599  mobile stacked (left-aligned)
   600–899 tablet portrait stacked (wide, consistent center)
   900–1199 tablet landscape two-column
   ≥1200 desktop overlay (approved)
   ================================================================ */

/* —— Mobile ≤599 ——
   ADP / Gusto pattern: centered stack, taller first screen, readable type. */
@media (max-width: 599.98px) {
    /* Shared by USA / Canada / UK / Global (.psx-hero-with-marquee) */
    .paystub.psx-hero-with-marquee {
        /* Taller first-screen band under header + announcement */
        min-height: calc(100vh - 5.5rem) !important; /* fallback */
        min-height: calc(100svh - 5.5rem) !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        overflow-x: clip;
        overflow-y: visible;
        padding: 0;
        box-sizing: border-box;
    }
    .psx-hero-shell {
        order: 1;
        position: relative;
        z-index: 5;
        width: 100%;
        max-width: 100%;
        margin: 0;
        /* More vertical air so the hero reads as a full first screen */
        padding: 2.15rem 1.35rem 1.45rem;
        text-align: center;
        pointer-events: none;
        flex: 0 0 auto;
    }
    .psx-hero-shell .psx-hero-copy,
    .psx-hero-shell .psx-hero-copy a { pointer-events: auto; }
    .psx-hero-copy {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        text-align: center;
    }
    .paystub.psx-hero-with-marquee h1.instant {
        align-items: center;
        margin: 0 auto 0.95rem !important;
        text-align: center !important;
        gap: 0.12em;
        width: 100%;
    }
    /* Fluid mobile type — slightly larger than prior left-aligned stack */
    .paystub.psx-hero-with-marquee h1.instant .instant-lead {
        font-size: clamp(2.15rem, 8.6vw, 2.7rem);
        line-height: 1.08;
        white-space: nowrap;
        letter-spacing: -0.03em;
    }
    .paystub.psx-hero-with-marquee h1.instant .instant-accent {
        font-size: clamp(2.25rem, 9vw, 2.9rem);
        line-height: 1.1;
        white-space: nowrap;
        letter-spacing: -0.03em;
    }
    .paystub.psx-hero-with-marquee .hero-lede-sub {
        max-width: 34em;
        margin: 0 auto;
        text-align: center;
        font-size: clamp(1.08rem, 4.15vw, 1.22rem);
        line-height: 1.58;
    }
    .psx-hero-cta-row {
        justify-content: center;
        margin-top: 1.55rem;
        width: 100%;
    }
    /* Compact mobile CTA — not a full-bleed desktop-width bar */
    .paystub .psx-hero-cta-row a.btn.Generate,
    .psx-hero-cta-row a.btn.Generate {
        width: auto !important;
        max-width: min(280px, 92%) !important;
        min-width: 0 !important;
        min-height: 48px !important;
        height: 48px !important;
        padding: 0 1.35rem !important;
        font-size: 1.12rem !important;
        line-height: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        border-radius: 0.55rem !important;
    }
    /* Longer regional CTA labels (Canada / UK) */
    .paystub.psx-hero--canada .psx-hero-cta-row a.btn.Generate,
    .paystub.psx-hero--uk .psx-hero-cta-row a.btn.Generate {
        max-width: min(320px, 94%) !important;
        font-size: 1.05rem !important;
        padding: 0 1.15rem !important;
    }
    .psx-hero-store-row {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-top: 1.85rem;
        margin-bottom: 0.35rem;
        gap: 0.7rem;
        width: 100% !important;
    }
    .psx-hero-store-row a {
        display: inline-flex !important;
        line-height: 0;
        flex: 0 0 auto;
    }
    .psx-hero-store-row .storbtn {
        height: 36px !important;
        width: auto !important;
        max-width: 128px !important;
        object-fit: contain !important;
    }
    .psx-hero-marquee {
        position: relative !important;
        inset: auto !important;
        order: 2;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        /* Sit toward bottom of the taller first-screen band when space remains */
        margin-top: auto;
        padding: 0.85rem 0 1.75rem;
        pointer-events: auto;
        overflow: hidden;
    }
    .psx-hero-marquee__scrim {
        display: none;
    }
    .psx-hero-marquee__viewport {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: 100%;
        height: auto !important;
        padding: 0 1.35rem;
        overflow: hidden;
        justify-content: flex-start;
        align-items: flex-start;
    }
    .psx-hero-marquee__card {
        width: min(86vw, 340px) !important;
        height: auto !important;
        max-height: none !important;
        border-radius: 12px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    }
    .psx-hero-marquee__card img,
    .psx-hero-marquee--equal-height .psx-hero-marquee__card,
    .psx-hero-marquee--equal-height .psx-hero-marquee__card img {
        height: auto !important;
        max-height: none !important;
        aspect-ratio: 640 / 820;
        object-fit: contain;
        object-position: center top;
    }
    .psx-hero-marquee--equal-height .psx-hero-marquee__card {
        display: block;
    }
    .psx-hero-marquee__group {
        gap: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Regional heroes — keep hierarchy while fitting longer Generator accent lines */
@media (max-width: 599.98px) {
    .paystub.psx-hero--canada h1.instant .instant-lead,
    .paystub.psx-hero--uk h1.instant .instant-lead,
    .paystub.psx-hero--usa h1.instant .instant-lead,
    .paystub.psx-hero--global h1.instant .instant-lead {
        font-size: clamp(2.05rem, 8vw, 2.55rem);
    }
    .paystub.psx-hero--canada h1.instant .instant-accent,
    .paystub.psx-hero--uk h1.instant .instant-accent,
    .paystub.psx-hero--usa h1.instant .instant-accent,
    .paystub.psx-hero--global h1.instant .instant-accent {
        font-size: clamp(2.05rem, 7.8vw, 2.6rem);
        letter-spacing: -0.04em;
        white-space: normal;
        max-width: 100%;
        text-wrap: balance;
    }
}

@media (max-width: 359.98px) {
    .paystub.psx-hero-with-marquee h1.instant .instant-accent {
        white-space: normal;
        text-wrap: balance;
    }
    .psx-hero-store-row {
        flex-wrap: wrap;
    }
}

/* —— Tablet portrait 600–899 (centered stack, same ADP/Gusto pattern) —— */
@media (min-width: 600px) and (max-width: 899.98px) {
    .paystub.psx-hero-with-marquee {
        min-height: calc(100vh - 5.75rem) !important;
        min-height: calc(100svh - 5.75rem) !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        overflow-x: clip;
        padding: 0;
        box-sizing: border-box;
    }
    .psx-hero-shell {
        order: 1;
        width: 100%;
        max-width: min(100% - 48px, 720px);
        margin: 0 auto;
        padding: 2.35rem 1.65rem 1.45rem;
        text-align: center;
        pointer-events: none;
        flex: 0 0 auto;
    }
    .psx-hero-shell .psx-hero-copy,
    .psx-hero-shell .psx-hero-copy a { pointer-events: auto; }
    .psx-hero-copy {
        width: 100%;
        max-width: 640px;
        margin: 0 auto;
        text-align: center;
    }
    .paystub.psx-hero-with-marquee h1.instant {
        align-items: center;
        margin: 0 auto 0.8rem !important;
        text-align: center !important;
    }
    .paystub.psx-hero-with-marquee h1.instant .instant-lead {
        font-size: clamp(2.35rem, 4.5vw, 2.85rem);
        white-space: nowrap;
        letter-spacing: -0.03em;
    }
    .paystub.psx-hero-with-marquee h1.instant .instant-accent {
        font-size: clamp(2.55rem, 5.1vw, 3.15rem);
        white-space: nowrap;
        letter-spacing: -0.03em;
    }
    .paystub.psx-hero-with-marquee .hero-lede-sub {
        max-width: 48ch;
        margin: 0 auto;
        text-align: center;
        font-size: clamp(1.12rem, 1.75vw, 1.24rem);
        line-height: 1.55;
    }
    .psx-hero-cta-row {
        justify-content: center;
        margin-top: 1.55rem;
    }
    .paystub .psx-hero-cta-row a.btn.Generate,
    .psx-hero-cta-row a.btn.Generate {
        width: auto !important;
        min-width: 0 !important;
        max-width: 280px !important;
        min-height: 48px !important;
        height: 48px !important;
        padding: 0 1.5rem !important;
        font-size: 1.12rem !important;
        line-height: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .paystub.psx-hero--canada .psx-hero-cta-row a.btn.Generate,
    .paystub.psx-hero--uk .psx-hero-cta-row a.btn.Generate {
        max-width: 340px !important;
        font-size: 1.08rem !important;
    }
    .psx-hero-store-row {
        display: flex !important;
        justify-content: center !important;
        margin-top: 1.85rem;
        margin-bottom: 0.5rem;
        gap: 0.75rem;
        width: 100%;
    }
    .psx-hero-store-row .storbtn {
        height: 38px !important;
        width: auto !important;
        max-width: 136px !important;
    }
    .psx-hero-marquee {
        position: relative !important;
        inset: auto !important;
        order: 2;
        width: 100%;
        height: auto !important;
        margin-top: auto;
        padding: 1rem 0 2rem;
        pointer-events: auto;
        overflow: hidden;
    }
    .psx-hero-marquee__scrim { display: none; }
    .psx-hero-marquee__viewport {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        width: 100%;
        height: auto !important;
        padding: 0 1.5rem;
        justify-content: center;
        overflow: hidden;
    }
    .psx-hero-marquee__card {
        width: min(72vw, 420px) !important;
        height: auto !important;
        max-height: none !important;
        border-radius: 14px;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
    }
    .psx-hero-marquee__card img,
    .psx-hero-marquee--equal-height .psx-hero-marquee__card,
    .psx-hero-marquee--equal-height .psx-hero-marquee__card img {
        height: auto !important;
        aspect-ratio: 640 / 820;
        object-fit: contain;
        object-position: center top;
    }
    .psx-hero-marquee--equal-height .psx-hero-marquee__card {
        display: block;
    }
}

/* —— Tablet landscape / small laptop 900–1199: two-column —— */
@media (min-width: 900px) and (max-width: 1199.98px) {
    .paystub.psx-hero-with-marquee {
        min-height: 0 !important;
        height: auto !important;
        display: grid !important;
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        align-items: center;
        column-gap: clamp(1.5rem, 4vw, 3rem);
        padding: 1.5rem clamp(1.35rem, 3.5vw, 2.5rem) 1.75rem;
        overflow: hidden;
    }
    .psx-hero-shell {
        position: relative;
        z-index: 5;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        pointer-events: none;
    }
    .psx-hero-shell .psx-hero-copy,
    .psx-hero-shell .psx-hero-copy a { pointer-events: auto; }
    .psx-hero-copy {
        width: 100%;
        max-width: 420px;
        margin: 0;
        text-align: left;
    }
    .paystub.psx-hero-with-marquee h1.instant {
        align-items: flex-start;
        text-align: left !important;
        margin: 0 0 0.75rem !important;
    }
    .paystub.psx-hero-with-marquee h1.instant .instant-lead {
        font-size: clamp(1.85rem, 2.4vw, 2.35rem);
        white-space: nowrap;
    }
    .paystub.psx-hero-with-marquee h1.instant .instant-accent {
        font-size: clamp(2.05rem, 2.8vw, 2.7rem);
        white-space: nowrap;
    }
    .paystub.psx-hero-with-marquee .hero-lede-sub {
        max-width: 40ch;
        margin: 0;
        text-align: left;
        font-size: 1.05rem;
        line-height: 1.5;
    }
    .psx-hero-cta-row {
        justify-content: flex-start;
        margin-top: 1.2rem;
    }
    .paystub .psx-hero-cta-row a.btn.Generate,
    .psx-hero-cta-row a.btn.Generate {
        width: auto !important;
        max-width: 280px !important;
        min-height: 48px !important;
        height: 48px !important;
        padding: 0 1.5rem !important;
        font-size: 0.98rem !important;
        line-height: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .psx-hero-store-row {
        justify-content: flex-start;
        margin-top: 1.1rem;
    }
    .psx-hero-marquee {
        position: relative !important;
        inset: auto !important;
        width: 100%;
        height: auto !important;
        min-height: 380px;
        align-self: stretch;
        pointer-events: auto;
        overflow: hidden;
    }
    .psx-hero-marquee__scrim {
        display: none;
    }
    .psx-hero-marquee__viewport {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: 100%;
        height: 100%;
        min-height: 380px;
        overflow: hidden;
        align-items: center;
    }
    .psx-hero-marquee__card {
        width: clamp(240px, 34vw, 320px) !important;
        height: auto !important;
        max-height: none !important;
    }
    .psx-hero-marquee__card img,
    .psx-hero-marquee--equal-height .psx-hero-marquee__card,
    .psx-hero-marquee--equal-height .psx-hero-marquee__card img {
        height: auto !important;
        aspect-ratio: 640 / 820;
        object-fit: contain;
    }
    .psx-hero-marquee--equal-height .psx-hero-marquee__card {
        display: block;
        height: auto !important;
    }
}

/* —— Desktop ≥1200: preserve approved overlay composition —— */
@media (min-width: 1200px) {
    .paystub.psx-hero-with-marquee {
        min-height: clamp(460px, 56vh, 640px);
        display: flex;
        align-items: center;
        flex-direction: row;
    }
    .psx-hero-shell {
        padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 4vw, 3rem);
    }
    .psx-hero-copy {
        width: min(100%, 440px);
        max-width: 440px;
        text-align: left;
    }
    .psx-hero-marquee {
        position: absolute;
        inset: 0;
        z-index: 1;
        width: auto;
        pointer-events: none;
        overflow: hidden;
    }
    .psx-hero-marquee__scrim {
        display: block;
    }
    .psx-hero-marquee__viewport {
        position: absolute;
        left: 34%;
        right: -6%;
        top: 5%;
        bottom: 0;
    }
    .psx-hero-marquee__card {
        width: clamp(260px, 26vw, 380px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .psx-hero-marquee__track,
    .psx-hero-marquee__track.is-animating {
        animation: none !important;
        transform: none !important;
    }
}

/* ================================================================
   0a-ii. CANADA LANDING PAGE — marketing sections & image cards
   ================================================================ */

.psx-ca-section {
    padding: clamp(2.5rem, 5vw, 4.5rem) 0;
    background: #fff;
}
.psx-ca-section.canada-soft-bg,
.psx-ca-section--features {
    background: #fafafa;
}
.psx-ca-section__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 2.5vw, 1.5rem);
}
.psx-ca-section__inner--narrow {
    max-width: 820px;
}
.psx-ca-section__head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
}
.psx-ca-section__foot {
    margin-top: clamp(2rem, 4vw, 2.75rem);
    text-align: center;
}
.psx-ca-eyebrow {
    display: inline-block;
    margin-bottom: 0.65rem;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.09);
    color: #dc2626;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
.psx-ca-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.65rem, 2.5vw, 2.35rem);
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
.psx-ca-lead {
    margin: 0;
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.65;
    color: #334155;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
.psx-ca-lead--center {
    text-align: center;
}
.psx-ca-checklist {
    margin: 1.25rem 0 1.75rem;
    padding: 0;
    list-style: none;
}
.psx-ca-checklist li {
    position: relative;
    padding-left: 1.45rem;
    margin-bottom: 0.55rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #334155;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
.psx-ca-checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #16a34a;
    font-weight: 700;
}
.psx-ca-split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}
.psx-ca-card-grid {
    display: grid;
    gap: clamp(1rem, 2.5vw, 1.5rem);
}
.psx-ca-card-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.psx-ca-card-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.psx-ca-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 16px;
    padding: clamp(1rem, 2vw, 1.25rem);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
    height: 100%;
}
.psx-ca-card--feature {
    background: rgba(255, 255, 255, 0.85);
}
.psx-ca-card__title {
    margin: 0.85rem 0 0.45rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
.psx-ca-card__body {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.6;
    color: #475569;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
.psx-ca-tpl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: clamp(1rem, 2vw, 1.35rem);
}
.psx-ca-tpl-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 14px;
    padding: 0.75rem;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.05);
}
.psx-ca-tpl-card__title {
    margin: 0.65rem 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}
.psx-ca-tpl-card__meta {
    margin: 0;
    font-size: 0.78rem;
    color: #64748b;
}
.psx-ca-img-card {
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px dashed rgba(100, 116, 139, 0.35);
}
.psx-ca-img-card--landscape { aspect-ratio: 16 / 10; }
.psx-ca-img-card--portrait { aspect-ratio: 3 / 4; }
.psx-ca-img-card--square { aspect-ratio: 1 / 1; }
.psx-ca-img-card--compact { max-height: 140px; }
.psx-ca-img-card--has-image {
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.08);
}
.psx-ca-img-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.psx-ca-img-card__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    height: 100%;
    padding: 0.75rem;
    text-align: center;
    background: linear-gradient(145deg, #f8fafc, #eef2ff);
}
.psx-ca-img-card__icon { font-size: 1.35rem; line-height: 1; }
.psx-ca-img-card__slot {
    font-size: 0.72rem;
    font-weight: 700;
    color: #334155;
    text-transform: capitalize;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
.psx-ca-img-card__hint {
    font-size: 0.65rem;
    color: #94a3b8;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
.psx-ca-faq__item {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: #fff;
    padding: 0.85rem 1rem;
    margin-bottom: 0.65rem;
}
.psx-ca-faq__item summary {
    cursor: pointer;
    font-weight: 700;
    color: #0f172a;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    list-style: none;
}
.psx-ca-faq__item summary::-webkit-details-marker { display: none; }
.psx-ca-faq__item p {
    margin: 0.65rem 0 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #475569;
}
.canada-hero.psx-hero-with-marquee .region-hero-copy .hero-lede-line,
.canada-hero.psx-hero-with-marquee .instant {
    color: #fff !important;
}

/* Canada hero — keep copy on solid gradient; marquee stays right */
@media (min-width: 992px) {
    .canada-hero.psx-hero-with-marquee .psx-hero-marquee__scrim {
        background: linear-gradient(
            90deg,
            #252e58 0%,
            #252e58 34%,
            #252e58f2 44%,
            rgba(37, 46, 88, 0.9) 52%,
            rgba(99, 97, 211, 0.5) 64%,
            rgba(7, 169, 108, 0.08) 74%,
            rgba(7, 169, 108, 0) 82%
        );
    }
    .canada-hero.psx-hero-with-marquee .psx-hero-marquee__viewport {
        left: 46%;
        right: -4%;
    }
    .canada-hero.psx-hero-with-marquee .psx-hero-copy {
        flex: 0 0 44% !important;
        max-width: 500px !important;
        text-align: left !important;
    }
    .canada-hero.psx-hero-with-marquee .region-hero-copy h1.instant,
    .canada-hero.psx-hero-with-marquee .region-hero-copy .hero-lede,
    .canada-hero.psx-hero-with-marquee .region-hero-copy .hero-lede-line {
        text-align: left !important;
    }
    .canada-hero.psx-hero-with-marquee .region-hero-badges {
        justify-content: flex-start !important;
    }
    .canada-hero.psx-hero-with-marquee > .container-fluid > .row > .col-set {
        margin: 0 auto 0 0 !important;
    }
    .canada-hero.psx-hero-with-marquee .psx-hero-copy {
        position: relative;
        z-index: 6;
    }
}

/* Canada / UK / Global — mid-page Generate CTAs (hero overridden below) */
a.btn.Generate.generate-cta-canada,
a.btn.Generate.generate-cta-uk,
a.btn.Generate.generate-cta-global {
    white-space: nowrap !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    display: inline-block !important;
    padding: 0.5rem 1.65rem !important;
    font-size: 1.125rem !important;
    line-height: 1.35 !important;
}
/* Hero regional CTAs — same compact flex control as USA */
.paystub .psx-hero-cta-row a.btn.Generate.generate-cta-canada,
.paystub .psx-hero-cta-row a.btn.Generate.generate-cta-uk,
.paystub .psx-hero-cta-row a.btn.Generate.generate-cta-global {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: min(320px, 94%) !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 1.15rem !important;
    font-size: 0.9rem !important;
    line-height: 1 !important;
}
@media (max-width: 575px) {
    a.btn.Generate.generate-cta-canada,
    a.btn.Generate.generate-cta-uk,
    a.btn.Generate.generate-cta-global {
        font-size: 0.92rem !important;
        padding: 0.45rem 1.1rem !important;
    }
    .paystub .psx-hero-cta-row a.btn.Generate.generate-cta-canada,
    .paystub .psx-hero-cta-row a.btn.Generate.generate-cta-uk,
    .paystub .psx-hero-cta-row a.btn.Generate.generate-cta-global {
        font-size: 0.9rem !important;
        padding: 0 1.15rem !important;
        height: 48px !important;
        min-height: 48px !important;
        line-height: 1 !important;
    }
}
@media (max-width: 479px) {
    a.btn.Generate.generate-cta-canada,
    a.btn.Generate.generate-cta-uk,
    a.btn.Generate.generate-cta-global {
        width: auto !important;
        max-width: calc(100vw - 32px) !important;
        min-width: 0 !important;
    }
    .paystub .psx-hero-cta-row a.btn.Generate.generate-cta-canada,
    .paystub .psx-hero-cta-row a.btn.Generate.generate-cta-uk,
    .paystub .psx-hero-cta-row a.btn.Generate.generate-cta-global {
        max-width: min(320px, 94%) !important;
    }
}

.psx-marketing-img-pending {
    display: inline-block;
    background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px dashed rgba(148, 163, 184, 0.55);
    border-radius: 8px;
    vertical-align: middle;
    box-sizing: border-box;
}
.px-step-card__img.psx-marketing-img-pending {
    width: 100%;
    min-height: 200px;
    aspect-ratio: 16 / 10;
}
.px-audience-card__img.psx-marketing-img-pending {
    width: 100%;
    min-height: 220px;
    aspect-ratio: 16 / 10;
}
.list-img.psx-marketing-img-pending,
.salary.psx-marketing-img-pending {
    width: 94px;
    height: 94px;
    border-radius: 50%;
}

/* Canada page — reuse home section layouts with placeholder image cards */
.px-step-card__visual--ca .psx-ca-img-card {
    width: 100%;
    border-radius: 12px;
    min-height: 180px;
}
.px-step-card__visual--ca .psx-ca-img-card__placeholder {
    min-height: 180px;
}
.px-audience-card__media--ca {
    display: flex;
    align-items: center;
    justify-content: center;
}
.px-audience-card__media--ca .psx-ca-img-card {
    width: 100%;
    min-height: 220px;
}
.psx-proof-mosaic__piece .psx-ca-img-card {
    width: 100%;
    height: 100%;
    min-height: 200px;
}
.psx-ca-calc-icon,
.psx-ca-box-icon {
    display: inline-block;
    width: 94px;
    height: 94px;
    margin: 0 auto;
}
.psx-ca-calc-icon .psx-ca-img-card,
.psx-ca-box-icon .psx-ca-img-card {
    width: 94px;
    height: 94px;
    border-radius: 12px;
}
.psx-ca-three-box .box-icon .psx-ca-box-icon {
    margin-bottom: 0.75rem;
}
.psx-proof-section--canada .psx-proof-cta__btn.psx-ca-btn {
    width: auto !important;
    white-space: nowrap !important;
}
.psx-ca-calculations .Generate.psx-ca-btn {
    margin-top: 0.5rem;
}

/* Canada CTAs — compact, single-line labels */
.canada-hero .Generate.psx-ca-btn,
.psx-ca-section .Generate.psx-ca-btn,
.psx-ca-section__foot .Generate.psx-ca-btn,
.psx-ca-calculations .Generate.psx-ca-btn,
.psx-proof-section--canada .Generate.psx-ca-btn {
    width: auto !important;
    min-width: 0 !important;
    display: inline-block !important;
    padding: 0.72rem 1.55rem !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    border-radius: 999px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.psx-ca-split__copy {
    text-align: left;
}
.psx-ca-split__copy .psx-ca-btn {
    margin-top: 0.25rem;
}

/* Cards — center placeholders and copy inside each card */
.psx-ca-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.psx-ca-card .psx-ca-img-card {
    width: 100%;
    align-self: center;
}
.psx-ca-card__title,
.psx-ca-card__body {
    width: 100%;
    text-align: center;
}
.psx-ca-card-grid--3,
.psx-ca-card-grid--4 {
    justify-items: center;
}
.psx-ca-card-grid--3 .psx-ca-card,
.psx-ca-card-grid--4 .psx-ca-card {
    width: 100%;
    max-width: 320px;
}
.psx-ca-img-card__placeholder {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}
.psx-ca-tpl-grid {
    justify-items: center;
}
.psx-ca-tpl-card {
    width: 100%;
    max-width: 240px;
    text-align: center;
}
.psx-ca-tpl-card .psx-ca-img-card {
    margin-left: auto;
    margin-right: auto;
}
.psx-ca-section__foot {
    display: flex;
    justify-content: center;
}

@media (max-width: 575px) {
    .canada-hero .Generate.psx-ca-btn,
    .psx-ca-section .Generate.psx-ca-btn {
        white-space: normal !important;
        font-size: 0.98rem !important;
        padding: 0.65rem 1.2rem !important;
        max-width: 100%;
    }
}

@media (max-width: 991px) {
    .psx-ca-split,
    .psx-ca-card-grid--3,
    .psx-ca-card-grid--4 {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   0b. HERO TEMPLATE CAROUSEL  –  legacy (other pages may still use)
   Crop-top approach: template fills full width, top portion visible.
   Prev/next arrows, hover "Preview" button, full-page zoom modal.
   ================================================================ */

/* ── Outer wrapper ── */
.hero-tpl-carousel {
    position: relative;
    width: 100%;
}

/* Home hero only: align both columns to the same header gutters.
   Legacy newstyle.css offsets .col-set right and .col-set1 left via fixed margins. */
@media (max-width: 900px) {
    .paystub:not(.region-landing-hero) > .container-fluid {
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box;
    }
}

@media (min-width: 901px) {
    .paystub:not(.region-landing-hero) > .container-fluid {
        padding-left: max(30px, calc((100vw - min(100vw, 1500px)) * 0.5 + 30px)) !important;
        padding-right: max(30px, calc((100vw - min(100vw, 1500px)) * 0.5 + 30px)) !important;
        box-sizing: border-box;
    }
}

@media (min-width: 1024px) {
    .paystub:not(.region-landing-hero) > .container-fluid > .row > .col-set {
        margin: 0 auto 0 0 !important;
    }
    /* Right column: pin to right edge of container.
       Absorb both Bootstrap 15px gutters so the template card can grow a little
       wider/taller without moving the left text block or expanding the whole section too much. */
    .paystub:not(.region-landing-hero) > .container-fluid > .row > .col-set1 {
        margin: 0 0 0 auto !important;
        justify-content: flex-end !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .paystub:not(.region-landing-hero) > .container-fluid > .row > .col-set1 .hero-tpl-carousel {
        margin-left: auto;
        margin-right: 0;
    }
}

/* ── Fixed frame: reveals top portion of each slide ── */
.hero-tpl-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 820 / 700;
    border-radius: 0;
    border: none;
    background: none;
    overflow: hidden;
    box-shadow: none;
}

/* ── Grid stacking: all slides share one cell → zero layout shift ── */
.hero-tpl-track {
    display: grid;
    width: 100%;
    height: 100%;
}

.hero-tpl-slide {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
    align-self: stretch;
    justify-self: stretch;
    position: relative;
}

.hero-tpl-slide.hero-tpl-active {
    opacity: 1;
    pointer-events: auto;
}

/* Slide 0 — static hero image fills the frame */
.hero-tpl-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* ── iframe wrapper: clips bottom — iframe fills full width via JS scale ── */
.tpl-frame-wrap {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* iframe is 820 px wide × 1200 px tall.
   JS sets transform: scale(frameWidth/820) so PDF fills the full frame width.
   overflow:hidden on .tpl-frame-wrap clips anything below the frame height. */
.tpl-preview-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 820px;
    height: 1200px;
    border: none;
    outline: none;
    color-scheme: light;
    pointer-events: none;
    transform-origin: top left;
    display: block;
}

/* Template name — hidden; shown only in modal title */
.tpl-name-badge { display: none; }

/* ── Prev / Next circle arrow buttons ── */
.hero-tpl-prev,
.hero-tpl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(0, 0, 0, 0.10);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #333;
    line-height: 1;
    padding: 0;
    transition: background 0.2s, opacity 0.2s, box-shadow 0.2s;
    opacity: 0;                  /* hidden until frame hovered */
    pointer-events: none;
}
.hero-tpl-prev { left: 10px; }
.hero-tpl-next { right: 10px; }

.hero-tpl-frame:hover .hero-tpl-prev,
.hero-tpl-frame:hover .hero-tpl-next {
    opacity: 0.85;
    pointer-events: auto;
}
.hero-tpl-prev:hover,
.hero-tpl-next:hover {
    background: #fff;
    opacity: 1 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

/* ── Hover overlay with "Preview" button ── */
.hero-tpl-slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    background: rgba(0, 0, 0, 0);
}
/* Only show overlay on template slides (not slide-0 image) */
.hero-tpl-slide.hero-tpl-has-preview:hover .hero-tpl-slide-overlay {
    opacity: 1;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.04);
}
.hero-tpl-preview-btn {
    background: #fff;
    border: none;
    border-radius: 24px;
    padding: 10px 30px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.3px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.hero-tpl-preview-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.32);
}

/* ── Dot navigation ── */
.hero-tpl-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.hero-tpl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c8d6de;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s ease, transform 0.25s ease;
}
.hero-tpl-dot.hero-tpl-dot-on {
    background: #e53935;
    transform: scale(1.45);
}

/* ================================================================
   TEMPLATE PREVIEW MODAL  –  full-page zoom preview
   ================================================================ */
.hero-tpl-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    /* Same hero treatment as .paystub — one continuous look, light dim for focus */
    background-color: #252e58;
    background-image:
        linear-gradient(rgba(12, 18, 36, 0.5), rgba(12, 18, 36, 0.5)),
        linear-gradient(96deg,
            #252e58e8 5%,
            #6361d3 46%,
            #07a96cd9 100%);
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.hero-tpl-modal.hero-tpl-modal-open {
    display: flex;
}
.hero-tpl-modal-inner {
    position: relative;
    width: 100%;
    max-width: 920px;
    height: 88vh;
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    animation: htModalIn 0.22s ease;
}
@keyframes htModalIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
.hero-tpl-modal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    border-bottom: none;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-shrink: 0;
    gap: 8px;
}
.hero-tpl-modal-title {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ── Modal prev / next nav ── */
.hero-tpl-modal-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-right: 8px;
}
.hero-tpl-modal-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    font-size: 20px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s;
}
.hero-tpl-modal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: none;
}
.hero-tpl-modal-nav-counter {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    min-width: 38px;
    text-align: center;
    white-space: nowrap;
}

.hero-tpl-modal-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.hero-tpl-modal-controls button {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s;
}
.hero-tpl-modal-controls button:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
}
.hero-tpl-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.hero-tpl-modal-close:hover {
    background: rgba(229, 57, 53, 0.35);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
}
.hero-tpl-modal-zoom-label {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    min-width: 40px;
    text-align: center;
}
.hero-tpl-modal-viewport {
    flex: 1;
    overflow: auto;
    background: transparent;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
}
.hero-tpl-modal-iframe {
    border: none;
    outline: none;
    background: #ffffff;
    display: block;
    width: 820px;
    height: 1200px;
    transform-origin: top left;
    box-shadow: none;
    border-radius: 0;
    flex-shrink: 0;
}

/* Responsive: full-width on small screens */
@media (max-width: 600px) {
    .hero-tpl-modal-inner { height: 95vh; border-radius: 0; }
    .hero-tpl-modal-viewport { padding: 12px; }
    .hero-tpl-modal-iframe { width: 820px; }
    .hero-tpl-prev, .hero-tpl-next { width: 30px; height: 30px; font-size: 18px; }
}

/* ================================================================
   HOME PAGE — UNIVERSAL RESPONSIVE SYSTEM
   Breakpoints (component-driven, mobile-first):
     xs  ≤ 479px   phones portrait (iPhone SE, small Androids)
     sm  480–767px  phones landscape / large phones
     md  768–1023px tablets portrait (iPad mini, iPad, iPad Air)
     lg  1024–1279px tablets landscape / small laptops
     xl  1280px+   standard desktop and above
   ================================================================ */

/* ── Global safety: no overflow on any device ── */
img { max-width: 100%; height: auto; }

/* -------------------------------------------------------
   1. Hero banner – fluid typography & column rebalancing
   ------------------------------------------------------- */

/* Hero type — mobile-first base; large desktop overrides below */
.paystub.psx-hero-with-marquee h1.instant {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.08em;
    font-family: 'Outfit', 'Futura LT', 'Inter', 'Segoe UI', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.035em;
    margin: 0 0 0.85rem !important;
    padding: 0 !important;
    color: #fff !important;
    line-height: 1.12 !important;
    max-width: none;
}
.paystub.psx-hero-with-marquee h1.instant .instant-lead,
.paystub.psx-hero-with-marquee h1.instant .instant-accent {
    display: block;
    font-weight: 800;
    /* Keep "Payslips &" / "Payroll" on clean stacked lines (no cramped descenders) */
    white-space: nowrap;
}
.paystub.psx-hero-with-marquee h1.instant .instant-lead {
    color: #fff;
    font-size: clamp(1.45rem, 3.2vw + 0.55rem, 1.85rem);
    line-height: 1.12;
    margin-bottom: 0;
}
.paystub.psx-hero-with-marquee h1.instant .instant-accent {
    color: var(--psx-hero-accent, #FF4D2E);
    font-size: clamp(1.65rem, 3.8vw + 0.55rem, 2.15rem);
    line-height: 1.14;
    padding-bottom: 0.02em;
}
.paystub.psx-hero-with-marquee .hero-lede-sub {
    margin: 0;
    max-width: 36ch;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 0.4vw + 0.78rem, 1rem);
    line-height: 1.55;
    letter-spacing: 0.005em;
    color: rgba(226, 232, 240, 0.92);
    text-wrap: pretty;
}

/*
 * Mobile + tablet portrait — MUST sit after the unscoped hero type block above.
 * That block uses align-items:flex-start and a small clamp; earlier ≤599 rules
 * lost the cascade. Desktop (≥900 two-column / ≥1200) is unchanged.
 */
@media (max-width: 899.98px) {
    .paystub.psx-hero-with-marquee .psx-hero-copy,
    .paystub.psx-hero-with-marquee .psx-hero-copy.banner-left-content,
    .paystub.psx-hero-with-marquee .psx-hero-copy.payhead {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }
    .paystub.psx-hero-with-marquee h1.instant {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .paystub.psx-hero-with-marquee h1.instant .instant-lead,
    .paystub.psx-hero-with-marquee h1.instant .instant-accent {
        display: block !important;
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: auto !important;
        max-width: 100% !important;
    }
    .paystub.psx-hero-with-marquee h1.instant .instant-lead {
        font-size: clamp(2.2rem, 8.8vw, 2.75rem) !important;
        line-height: 1.08 !important;
    }
    .paystub.psx-hero-with-marquee h1.instant .instant-accent {
        font-size: clamp(2.3rem, 9.2vw, 2.95rem) !important;
        line-height: 1.1 !important;
        white-space: normal !important;
        text-wrap: balance;
    }
    .paystub.psx-hero-with-marquee .hero-lede-sub {
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        max-width: 36em !important;
        font-size: clamp(1.1rem, 4.2vw, 1.24rem) !important;
        line-height: 1.58 !important;
    }
    /* Larger CTA label only — keep the same 48px button shell */
    .paystub.psx-hero-with-marquee .psx-hero-cta-row a.btn.Generate,
    .paystub .psx-hero-cta-row a.btn.Generate {
        font-size: 1.12rem !important;
        letter-spacing: 0.01em !important;
    }
    .paystub.psx-hero-with-marquee .psx-hero-store-row {
        margin-top: 1.85rem !important;
    }
}

/* Desktop type scale — only at approved desktop breakpoint */
@media (min-width: 1200px) {
    .paystub.psx-hero-with-marquee {
        min-height: clamp(500px, 58vh, 660px);
    }
    .psx-hero-copy {
        width: min(100%, 440px);
        max-width: 440px;
    }
    .paystub.psx-hero-with-marquee h1.instant .instant-lead {
        font-size: clamp(2rem, 1.4vw + 1.35rem, 2.45rem);
        line-height: 1.1;
    }
    .paystub.psx-hero-with-marquee h1.instant .instant-accent {
        font-size: clamp(2.35rem, 1.8vw + 1.45rem, 2.95rem);
        line-height: 1.12;
    }
    .paystub.psx-hero-with-marquee .hero-lede-sub {
        max-width: 40ch;
        font-size: clamp(1.02rem, 0.25vw + 0.92rem, 1.12rem);
        line-height: 1.55;
    }
    .psx-hero-cta-row .Generate {
        padding: 0.85rem 1.55rem !important;
        font-size: 1.02rem !important;
    }
}

/* Large desktop — commanding platform-scale type */
@media (min-width: 1280px) {
    .paystub.psx-hero-with-marquee {
        min-height: clamp(520px, 58vh, 680px);
    }
    .psx-hero-copy {
        width: min(100%, 440px);
        max-width: 440px;
    }
    .paystub.psx-hero-with-marquee h1.instant {
        margin-bottom: 1rem !important;
    }
    .paystub.psx-hero-with-marquee h1.instant .instant-lead {
        font-size: clamp(2.4rem, 1.2vw + 1.7rem, 2.85rem);
        line-height: 1.08;
        margin-bottom: 0;
    }
    .paystub.psx-hero-with-marquee h1.instant .instant-accent {
        font-size: clamp(2.85rem, 1.55vw + 1.85rem, 3.4rem);
        line-height: 1.1;
    }
    .paystub.psx-hero-with-marquee .hero-lede-sub {
        max-width: 42ch;
        font-size: clamp(1.08rem, 0.2vw + 0.98rem, 1.2rem);
        line-height: 1.52;
    }
    .psx-hero-cta-row {
        margin-top: 1.55rem;
    }
    .psx-hero-cta-row .Generate {
        padding: 0.9rem 1.65rem !important;
        font-size: 1.05rem !important;
    }
    .psx-hero-store-row {
        margin-top: 1.5rem;
    }
    .psx-hero-marquee__viewport {
        left: 36%;
    }
}

/* Extra-wide desktops */
@media (min-width: 1536px) {
    .paystub.psx-hero-with-marquee h1.instant .instant-lead {
        font-size: 2.95rem;
    }
    .paystub.psx-hero-with-marquee h1.instant .instant-accent {
        font-size: 3.55rem;
    }
    .paystub.psx-hero-with-marquee .hero-lede-sub {
        font-size: 1.22rem;
        max-width: 44ch;
    }
    .psx-hero-copy {
        width: min(100%, 460px);
        max-width: 460px;
    }
}

/*
 * Regional desktop/tablet — break "& Payroll" onto next row so Generator
 * accents keep commanding size without spilling onto the marquee.
 * Mobile (≤599) left unchanged: break span stays inline via default display.
 */
@media (min-width: 600px) {
    .paystub.psx-hero--canada h1.instant .instant-accent,
    .paystub.psx-hero--usa h1.instant .instant-accent,
    .paystub.psx-hero--uk h1.instant .instant-accent,
    .paystub.psx-hero--global h1.instant .instant-accent {
        white-space: normal;
    }
    .paystub.psx-hero--canada h1.instant .instant-accent-break,
    .paystub.psx-hero--usa h1.instant .instant-accent-break,
    .paystub.psx-hero--uk h1.instant .instant-accent-break,
    .paystub.psx-hero--global h1.instant .instant-accent-break {
        display: block;
    }
}
@media (min-width: 600px) and (max-width: 899.98px) {
    .paystub.psx-hero--canada h1.instant .instant-accent,
    .paystub.psx-hero--usa h1.instant .instant-accent,
    .paystub.psx-hero--uk h1.instant .instant-accent,
    .paystub.psx-hero--global h1.instant .instant-accent {
        font-size: clamp(2.4rem, 4.6vw, 2.95rem);
        letter-spacing: -0.035em;
    }
}
@media (min-width: 900px) and (max-width: 1199.98px) {
    .paystub.psx-hero--canada h1.instant .instant-accent,
    .paystub.psx-hero--usa h1.instant .instant-accent,
    .paystub.psx-hero--uk h1.instant .instant-accent,
    .paystub.psx-hero--global h1.instant .instant-accent {
        font-size: clamp(2rem, 2.4vw, 2.5rem);
        letter-spacing: -0.035em;
    }
}
@media (min-width: 1200px) {
    .paystub.psx-hero--canada .psx-hero-copy,
    .paystub.psx-hero--usa .psx-hero-copy,
    .paystub.psx-hero--uk .psx-hero-copy,
    .paystub.psx-hero--global .psx-hero-copy {
        width: min(100%, 440px);
        max-width: 440px;
        overflow-x: clip;
    }
    /* “Instant Canadian” is longer than Instant Online / Instant UK */
    .paystub.psx-hero--canada h1.instant .instant-lead {
        font-size: clamp(1.85rem, 1.2vw + 1.15rem, 2.25rem);
        letter-spacing: -0.04em;
    }
    .paystub.psx-hero--canada h1.instant .instant-accent,
    .paystub.psx-hero--usa h1.instant .instant-accent,
    .paystub.psx-hero--uk h1.instant .instant-accent,
    .paystub.psx-hero--global h1.instant .instant-accent {
        /* Two-line break keeps Generator phrase in the copy spot */
        font-size: clamp(2.35rem, 1.8vw + 1.45rem, 2.95rem);
        letter-spacing: -0.035em;
        line-height: 1.1;
        max-width: 100%;
        box-sizing: border-box;
    }
}
@media (min-width: 1280px) {
    .paystub.psx-hero--canada h1.instant .instant-accent {
        font-size: clamp(2.85rem, 1.55vw + 1.85rem, 3.4rem);
    }
    .paystub.psx-hero--usa h1.instant .instant-accent,
    .paystub.psx-hero--uk h1.instant .instant-accent,
    .paystub.psx-hero--global h1.instant .instant-accent {
        font-size: clamp(2.55rem, 1.35vw + 1.65rem, 3.05rem);
    }
}
@media (min-width: 1536px) {
    .paystub.psx-hero--canada .psx-hero-copy,
    .paystub.psx-hero--usa .psx-hero-copy,
    .paystub.psx-hero--uk .psx-hero-copy,
    .paystub.psx-hero--global .psx-hero-copy {
        width: min(100%, 460px);
        max-width: 460px;
    }
    .paystub.psx-hero--canada h1.instant .instant-accent {
        font-size: 3.55rem;
    }
    /* Slightly under Canada — “Paystub/Payslip Generator” is the longer first accent line */
    .paystub.psx-hero--usa h1.instant .instant-accent,
    .paystub.psx-hero--uk h1.instant .instant-accent,
    .paystub.psx-hero--global h1.instant .instant-accent {
        font-size: 3.2rem;
    }
}

/* Keep regional accent ink inside the copy column (never over marquee) */
.paystub.psx-hero--usa .psx-hero-copy,
.paystub.psx-hero--canada .psx-hero-copy,
.paystub.psx-hero--uk .psx-hero-copy,
.paystub.psx-hero--global .psx-hero-copy {
    overflow-x: clip;
}
.paystub.psx-hero--usa h1.instant .instant-accent,
.paystub.psx-hero--canada h1.instant .instant-accent,
.paystub.psx-hero--uk h1.instant .instant-accent,
.paystub.psx-hero--global h1.instant .instant-accent {
    max-width: 100%;
    box-sizing: border-box;
}

/* Legacy hero helpers (non-shell pages / older markup) */
.paystub .paystub-hero-row { padding-bottom: 1.25rem !important; }
.paystub .banner-left-content .hero-lede { margin-top: 0.1rem; }
.paystub .banner-left-content .hero-lede .hero-lede-line {
    color: rgba(255, 255, 255, 0.92);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    margin-bottom: 0;
    line-height: 1.45;
}
.paystub .hero-lede-abc {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem !important;
}

/* Phone/tablet heading centering covered in ≤991.98px hero block above */

/* -------------------------------------------------------
   2. "With PaystubX" proof-of-income section – fluid type
   ------------------------------------------------------- */
.wrapper {
    max-width: 1280px !important;
    padding: 0 18px !important;
}

.wrapper .space-between {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 34px !important;
}

.wrapper .space-between > .col-lg-5 {
    flex: 0 0 calc(50% - 17px) !important;
    max-width: calc(50% - 17px) !important;
    margin: 0 !important;
    padding: 18px 18px 16px !important;
    border: 1px solid transparent !important;
    border-radius: 16px !important;
    background: transparent !important;
    box-shadow: none !important;
    transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.wrapper h1.WithPaystubX {
    margin: 0 0 8px !important;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: clamp(2rem, 2.4vw, 2.9rem) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.wrapper h3.Show,
.wrapper h3.Createpay {
    margin: 0 0 12px !important;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: clamp(1.35rem, 1.5vw, 2rem) !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: #1b2c32 !important;
}

.wrapper .space-between > .col-lg-5 ul {
    margin: 0 !important;
    padding-left: 1.2rem !important;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
}

.wrapper li.mt-2.proof {
    margin-top: 8px !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    line-height: 1.6 !important;
    color: #4d5c61 !important;
}

.wrapper .smallfont {
    margin-top: 14px !important;
    margin-bottom: 0 !important;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #24383f !important;
}

/* Hover-reveal cards for desktop/laptop */
@media (hover: hover) and (pointer: fine) {
    .wrapper .space-between > .col-lg-5:hover {
        background: linear-gradient(180deg, #ffffff 0%, #f8fcfd 100%) !important;
        border-color: #d8e7eb !important;
        box-shadow: 0 12px 26px rgba(16, 64, 79, 0.11) !important;
        transform: translateY(-2px);
    }
}

/* Touch devices: keep cards visible since hover is unavailable */
@media (hover: none) {
    .wrapper .space-between > .col-lg-5 {
        background: linear-gradient(180deg, #ffffff 0%, #f8fcfd 100%) !important;
        border-color: #d8e7eb !important;
        box-shadow: 0 8px 18px rgba(16, 64, 79, 0.08) !important;
    }
}

/* Keep image and copy in their own clean row section */
.wrapper > .row {
    align-items: center !important;
}

.wrapper .payimg2 {
    width: 100% !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    padding-bottom: 14px !important;
}

.wrapper .payyy {
    justify-content: flex-start !important;
}

.wrapper .img2-p {
    margin: 0 !important;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: clamp(1rem, 0.25vw + 0.94rem, 1.1rem) !important;
    line-height: 1.7 !important;
    max-width: 760px;
}

.wrapper .mobile-img-desktop .payimg {
    width: 100% !important;
    max-width: 290px !important;
    padding-bottom: 14px !important;
}

.wrapper .paytext {
    position: static !important;
    left: auto !important;
    top: auto !important;
    margin-top: 0 !important;
}

@media (max-width: 767px) {
    h1.WithPaystubX { font-size: clamp(1.55rem, 5.1vw, 2rem) !important; }
    h3.Show         { font-size: clamp(1.12rem, 4vw, 1.35rem) !important; }
    h3.Createpay    { font-size: clamp(1.05rem, 3.6vw, 1.25rem) !important; }
    li.mt-2.proof   { font-size: 14px !important; line-height: 1.55 !important; }
    .wrapper        { padding: 0 12px !important; }
    .wrapper .space-between {
        gap: 12px !important;
    }
    .wrapper .space-between > .col-lg-5 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 14px 12px 12px !important;
        border-radius: 12px !important;
    }
    .wrapper .space-between > .col-lg-5 ul {
        padding-left: 1rem !important;
    }
    .wrapper .payyy {
        justify-content: center !important;
        text-align: center !important;
    }
    .wrapper .img2-p {
        max-width: 100%;
        padding-left: 0 !important;
    }
    .wrapper .mobile-img-desktop .payimg {
        margin: 0 auto !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    h1.WithPaystubX { font-size: 30px !important; }
    h3.Show         { font-size: 22px !important; }
    h3.Createpay    { font-size: 20px !important; }
    li.mt-2.proof   { font-size: 15px !important; }
    .wrapper .space-between {
        gap: 18px !important;
    }
    .wrapper .space-between > .col-lg-5 {
        flex: 0 0 calc(50% - 9px) !important;
        max-width: calc(50% - 9px) !important;
        padding: 16px 14px !important;
    }
    .wrapper .img2-p {
        padding-left: 8px !important;
    }
}

@media (min-width: 1024px) {
    .wrapper .space-between {
        gap: 30px !important;
    }
    .wrapper .img2-p {
        padding-left: 26px !important; /* move this copy slightly right on desktop */
    }
}

/* -------------------------------------------------------
   3. Store badge images – universal height-based sizing
   The root cause of "Apple smaller": style.css fixes BOTH
   width (165px) and height (50px), distorting aspect ratios
   when overridden inconsistently. Fix: control only HEIGHT
   and let width scale naturally so every badge looks right.
   ------------------------------------------------------- */

/* Universal base: all badges same visual height, natural width */
img.storbtn {
    height: 46px !important;
    width: auto !important;
    max-width: none !important;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    object-fit: contain !important;
}

/* Badge containers: flex-wrap + gap replaces fragile Bootstrap margins.
   Keyed off .top-gogle alone so any spacing class combo works. */
.top-gogle,
.goggle {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: clamp(12px, 3vw, 20px) !important;
}

/* The home hero has a DOUBLE-NESTED top-gogle div.
   Kill extra spacing on the inner one so only the outer controls layout. */
.top-gogle > .top-gogle {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Kill Bootstrap ml-5 / ml-1 margins — gap handles spacing */
img.storbtn.ml-5 { margin-left: 0 !important; }
img.storbtn.ml-1 { margin-left: 0 !important; }

/* Tablet portrait (768–1023px): slightly smaller */
@media (min-width: 768px) and (max-width: 1023px) {
    img.storbtn { height: 42px !important; }
}

/* Phone (≤ 767px): smaller, centred */
@media (max-width: 767px) {
    img.storbtn { height: 40px !important; }
    .top-gogle,
    .goggle { justify-content: center !important; }
}

/* Smallest phones (≤ 479px): compact */
@media (max-width: 479px) {
    img.storbtn { height: 36px !important; }
}

/* -------------------------------------------------------
   4. FAQ Video section – framed professional cards
   ------------------------------------------------------- */

.faq-video-section {
    background: linear-gradient(160deg, #1a2a3a 0%, #0d1f30 100%);
    padding: 60px 0 70px;
}

.faq-video-heading {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.faq-video-subheading {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 32px;
    font-weight: 300;
}

.faq-video-section .vedio-box {
    padding: 0 12px;
    margin-bottom: 28px;
}

.video-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.video-card__thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
}

.video-card__thumb iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    display: block !important;
    min-height: 0 !important;
}

/* ── YouTube facade (thumbnail shown, iframe only loads on click) ── */
.yt-facade {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.yt-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}
.yt-facade:hover .yt-thumb { opacity: 0.75; }
.yt-play {
    position: relative;
    z-index: 2;
    width: 64px;
    height: 44px;
    background: #ff0000;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    transition: transform 0.15s, background 0.15s;
}
.yt-play::after {
    content: '';
    border-left: 20px solid #fff;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}
.yt-facade:hover .yt-play {
    background: #cc0000;
    transform: scale(1.1);
}
/* Replace iframe inside facade after click */
.yt-facade iframe {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

.video-card__body {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-card__badge {
    display: inline-block;
    background: #e8f4f8;
    color: #1a6a8a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    width: fit-content;
}

.video-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #1e1e1e;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 767px) {
    .faq-video-section   { padding: 40px 0 50px; }
    .faq-video-heading   { font-size: 1.5rem; }
    .faq-video-section .vedio-box { padding: 0 6px; margin-bottom: 20px; }
    .video-card__title   { font-size: 13px; }
}

/* -------------------------------------------------------
   5. Three feature boxes – modern card redesign
   ------------------------------------------------------- */

.three-box-section .box-wrapper {
    max-width: 1220px !important;
    margin: 0 auto !important;
    padding: 0 22px !important;
}

.three-box-section .box-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
    justify-content: center !important;
}

.three-box-section .box-border-outer {
    flex: 1 1 320px !important;
    width: auto !important;
    margin: 0 !important;
    border: 0 !important;
    box-sizing: border-box !important;
}

.three-box-section .box {
    height: 100% !important;
    padding: 22px 24px !important;
    border: 1px solid #e2edf0 !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fcfd 100%) !important;
    box-shadow: 0 10px 26px rgba(17, 65, 79, 0.08) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.three-box-section .box:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(17, 65, 79, 0.13) !important;
    border-color: #c5dde3 !important;
}

.three-box-section .box-content h6 {
    margin: 0 !important;
    padding: 0 0 12px !important;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: clamp(1.05rem, 0.35vw + 0.95rem, 1.35rem) !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    letter-spacing: 0.01em;
    text-align: center !important;
    color: #17272c !important;
}

.three-box-section .box-icon {
    max-width: 84px !important;
    margin: 0 auto !important;
    padding: 0 0 12px !important;
}

.three-box-section .box-icon img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
    object-fit: contain !important;
}

.three-box-section .bottom-content p {
    margin: 0 !important;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: clamp(0.92rem, 0.15vw + 0.88rem, 1rem) !important;
    font-weight: 500 !important;
    color: #5f6d72 !important;
    text-align: center !important;
    line-height: 1.7 !important;
    text-wrap: pretty;
}

/* Canada feature boxes — icon cards without image placeholders */
.psx-ca-feature-boxes .psx-ca-feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 28px !important;
    position: relative;
    overflow: hidden;
}
.psx-ca-feature-boxes .psx-ca-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 18px 18px 0 0;
}
.psx-ca-feature-boxes .psx-ca-feature-card--calc::before {
    background: linear-gradient(90deg, #dc2626 0%, #f97316 100%);
}
.psx-ca-feature-boxes .psx-ca-feature-card--provinces::before {
    background: linear-gradient(90deg, #1d4ed8 0%, #0ea5e9 100%);
}
.psx-ca-feature-boxes .psx-ca-feature-card--pdf::before {
    background: linear-gradient(90deg, #059669 0%, #10b981 100%);
}
.psx-ca-feature-boxes .psx-ca-feature-card__icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    flex-shrink: 0;
}
.psx-ca-feature-boxes .psx-ca-feature-card__icon svg {
    width: 40px;
    height: 40px;
}
.psx-ca-feature-boxes .psx-ca-feature-card--calc .psx-ca-feature-card__icon {
    background: linear-gradient(145deg, rgba(220, 38, 38, 0.12) 0%, rgba(249, 115, 22, 0.08) 100%);
    color: #dc2626;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.12);
}
.psx-ca-feature-boxes .psx-ca-feature-card--provinces .psx-ca-feature-card__icon {
    background: linear-gradient(145deg, rgba(29, 78, 216, 0.12) 0%, rgba(14, 165, 233, 0.08) 100%);
    color: #1d4ed8;
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.12);
}
.psx-ca-feature-boxes .psx-ca-feature-card--pdf .psx-ca-feature-card__icon {
    background: linear-gradient(145deg, rgba(5, 150, 105, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
    color: #059669;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.12);
}
.psx-ca-feature-boxes .box-content {
    order: 1;
    width: 100%;
}
.psx-ca-feature-boxes .box-content h3 {
    margin: 0 !important;
    padding: 0 0 10px !important;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: clamp(1.05rem, 0.35vw + 0.95rem, 1.35rem) !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    letter-spacing: 0.01em;
    text-align: center !important;
    color: #0f172a !important;
}
.psx-ca-feature-boxes .bottom-content {
    order: 2;
    width: 100%;
}
.psx-ca-feature-boxes .psx-ca-feature-card:hover .psx-ca-feature-card__icon {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Desktop: keep three cards in one row */
@media (min-width: 1024px) {
    .three-box-section .box-row {
        flex-wrap: nowrap !important;
        gap: 26px !important;
    }
    .three-box-section .box-border-outer {
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }
}

/* Tablet: comfortable two-column layout */
@media (min-width: 768px) and (max-width: 1023px) {
    .three-box-section .box-wrapper {
        padding: 0 20px !important;
    }
    .three-box-section .box-row {
        gap: 18px !important;
    }
    .three-box-section .box-border-outer {
        flex: 0 0 calc(50% - 9px) !important;
        max-width: calc(50% - 9px) !important;
    }
    .three-box-section .box {
        padding: 20px 20px !important;
    }
}

/* Phone: single clean stack with tighter spacing */
@media (max-width: 767px) {
    .three-box-section .box-wrapper {
        padding: 0 14px !important;
    }
    .three-box-section .box-row {
        gap: 14px !important;
    }
    .three-box-section .box-border-outer {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    .three-box-section .box {
        padding: 18px 18px !important;
        border-radius: 15px !important;
    }
    .three-box-section .box-icon {
        max-width: 72px !important;
        padding-bottom: 10px !important;
    }
    .three-box-section .bottom-content p {
        line-height: 1.62 !important;
    }
}

/* -------------------------------------------------------
   6. Calculations section – mobile & tablet polish
   ------------------------------------------------------- */
.calculations .row.mt-5 {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 18px !important;
    justify-content: center !important;
}

.calculations .row.mt-5 > .col-md-4 {
    display: flex;
    flex: 0 1 340px !important;
    max-width: 340px !important;
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.calculations .row.mt-5 > .col-md-4 > .calcheading,
.calculations .row.mt-5 > .col-md-4 > .pay-p,
.calculations .row.mt-5 > .col-md-4 > .list-img,
.calculations .row.mt-5 > .col-md-4 > img {
    position: relative;
    z-index: 1;
}

.calculations .row.mt-5 > .col-md-4 {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 24px 20px 20px !important;
    border: 1px solid rgba(194, 224, 231, 0.45);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(2px);
    box-shadow: 0 10px 24px rgba(7, 30, 37, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 100%;
}

.calculations .row.mt-5 > .col-md-4:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 26px rgba(7, 30, 37, 0.3);
    border-color: rgba(214, 240, 246, 0.8);
}

.calculations .row.mt-5 .calcheading {
    margin-bottom: 12px !important;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-weight: 700 !important;
    font-size: clamp(1.05rem, 0.25vw + 1rem, 1.35rem) !important;
    line-height: 1.35 !important;
}

.calculations .row.mt-5 .pay-p {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: clamp(0.9rem, 0.2vw + 0.86rem, 1rem) !important;
    font-weight: 400 !important;
    line-height: 1.7 !important;
    margin-bottom: 14px !important;
}

.calculations .row.mt-5 .list-img,
.calculations .row.mt-5 > .col-md-4 > img {
    width: 74px !important;
    height: 74px !important;
    object-fit: contain !important;
    object-position: center !important;
    margin-top: auto !important;
}

@media (max-width: 767px) {
    .calculations .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    .calculations h2.gen {
        font-size: 18px !important;
        padding-top: 24px !important;
        line-height: 1.4 !important;
    }
    .calculations .col-md-4 {
        margin-bottom: 0;
    }
    .calculations .row.mt-5 > .col-md-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 18px 14px 16px !important;
        border-radius: 14px;
    }
    .calculations .row.mt-5 .pay-p {
        line-height: 1.62 !important;
        margin-bottom: 10px !important;
    }
    .calculations .row.mt-5 .list-img,
    .calculations .row.mt-5 > .col-md-4 > img {
        width: 64px !important;
        height: 64px !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .calculations h2.gen {
        font-size: 22px !important;
        padding-top: 32px !important;
    }
    .calculations .row.mt-5 > .col-md-4 {
        flex: 0 0 calc(50% - 9px) !important;
        max-width: calc(50% - 9px) !important;
        padding: 20px 16px 18px !important;
    }
    img.list-img {
        width: 72px !important;
        height: 72px !important;
    }
}

@media (min-width: 1024px) {
    .calculations .row.mt-5 {
        gap: 20px !important;
    }
    .calculations .row.mt-5 > .col-md-4 {
        flex: 0 1 355px !important;
        max-width: 355px !important;
    }
}

/* -------------------------------------------------------
   7. "Ready to Explore" section – transparent hover cards
   ------------------------------------------------------- */
.ready-explore-section .col-md-6.text-left.mb-5,
.ready-explore-section .col-md-5.text-left.mb-5 {
    padding: 16px 18px !important;
    border: 1px solid transparent !important;
    border-radius: 18px !important;
    background: transparent !important;
    box-shadow: none !important;
    transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.ready-explore-section div.mt-5.ready {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: clamp(1.55rem, 1.7vw, 2.05rem) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #1c2d32 !important;
}

.ready-explore-section .col-md-6.text-left.mb-5 ul,
.ready-explore-section .col-md-6.text-left.mb-5 ul.list-outer {
    margin: 0 !important;
    padding-left: 1.2rem !important;
}

.ready-explore-section .col-md-6.text-left.mb-5 ul li,
.ready-explore-section ul.list-outer li {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: 17px !important;
    line-height: 1.6 !important;
    font-weight: 500 !important;
    color: #4d5d62 !important;
}

.ready-explore-section b.bottom-c,
.ready-explore-section .col-md-5.text-left.mb-5 b {
    display: block;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: clamp(1.2rem, 1.1vw, 1.55rem) !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: #1b2c32 !important;
}

.ready-explore-section p.b-p,
.ready-explore-section .col-md-5.text-left.mb-5 p.mt-1 {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: clamp(0.98rem, 0.3vw + 0.92rem, 1.1rem) !important;
    line-height: 1.7 !important;
    color: #4d5d62 !important;
}

@media (hover: hover) and (pointer: fine) {
    .ready-explore-section .col-md-6.text-left.mb-5:hover,
    .ready-explore-section .col-md-5.text-left.mb-5:hover {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(246, 251, 252, 0.82) 100%) !important;
        border-color: #d8e6ea !important;
        box-shadow: 0 12px 28px rgba(14, 57, 70, 0.11) !important;
        transform: translateY(-2px);
    }
}

@media (hover: none) {
    .ready-explore-section .col-md-6.text-left.mb-5,
    .ready-explore-section .col-md-5.text-left.mb-5 {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(246, 251, 252, 0.82) 100%) !important;
        border-color: #d8e6ea !important;
        box-shadow: 0 8px 20px rgba(14, 57, 70, 0.08) !important;
    }
}

@media (max-width: 767px) {
    .ready-explore-section .col-md-6.text-left.mb-5,
    .ready-explore-section .col-md-5.text-left.mb-5 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 14px 14px !important;
        border-radius: 14px !important;
        margin-bottom: 14px !important;
    }
    .ready-explore-section div.mt-5.ready {
        font-size: 22px !important;
        text-align: center !important;
        margin-top: 1.25rem !important;
    }
    .ready-explore-section .col-md-6.text-left.mb-5 ul,
    .ready-explore-section .col-md-6.text-left.mb-5 ul.list-outer {
        padding-left: 1rem !important;
    }
    .ready-explore-section .col-md-6.text-left.mb-5 ul li,
    .ready-explore-section ul.list-outer li {
        font-size: 14px !important;
        line-height: 1.55 !important;
    }
    .ready-explore-section b.bottom-c,
    .ready-explore-section .col-md-5.text-left.mb-5 b {
        font-size: 1.05rem !important;
    }
    .ready-explore-section p.b-p,
    .ready-explore-section .col-md-5.text-left.mb-5 p.mt-1 {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .ready-explore-section .col-md-6.text-left.mb-5,
    .ready-explore-section .col-md-5.text-left.mb-5 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 16px 16px !important;
    }
    .ready-explore-section div.mt-5.ready { font-size: 26px !important; }
    .ready-explore-section .col-md-6.text-left.mb-5 ul li,
    .ready-explore-section ul.list-outer li {
        font-size: 15px !important;
    }
}

/* -------------------------------------------------------
   8. Footer – complete professional responsive system
   Three breakpoints: desktop (992px+), tablet (768–991px),
   phone (≤767px). Each tuned for clean, centred layout.
   ------------------------------------------------------- */

/* ── Footer: accepted payment methods strip ── */
.footer-payment-strip-row {
    margin: 0 !important;
    padding: 0.5rem 0 1.25rem !important;
    border-top: 1px solid rgba(255,255,255,0.12);
}
.footer-payment-strip-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}
/* Capped at 520px — crisp at this size on all screens, not oversized */
.footer-payment-strip-img {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    margin: 0 auto;
    image-rendering: auto;
    -ms-interpolation-mode: bicubic;
}
@media (max-width: 575px) {
    .footer-payment-strip-img {
        max-width: 340px;
    }
}

/* ── Trustpilot reviews (above footer) ───────────────────────────── */
.psx-trustpilot {
    background: linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding: clamp(2.25rem, 4vw, 3.5rem) 0 clamp(1.75rem, 3vw, 2.5rem);
}
.psx-trustpilot__inner {
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
    box-sizing: border-box;
}
@media (max-width: 900px) {
    .psx-trustpilot__inner {
        padding-left: 20px;
        padding-right: 20px;
    }
}
.psx-trustpilot__head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 1.75rem;
}
.psx-trustpilot__brand-row {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}
.psx-trustpilot__eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}
.psx-trustpilot__tp-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
}
.psx-trustpilot__tp-link:hover {
    color: #00b67a;
    text-decoration: none;
}
.psx-trustpilot__tp-mark {
    width: 22px;
    height: 22px;
    display: block;
}
.psx-trustpilot__title {
    margin: 0 0 0.55rem;
    font-size: clamp(1.45rem, 2.2vw, 1.9rem);
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
.psx-trustpilot__lead {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.55;
    color: #475569;
}
.psx-trustpilot__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}
.psx-trustpilot__card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 16px;
    padding: 1.15rem 1.2rem 1.05rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.psx-trustpilot__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}
.psx-trustpilot__card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}
.psx-trustpilot__stars {
    display: inline-flex;
    gap: 0.12rem;
    letter-spacing: 0;
}
.psx-trustpilot__star {
    color: #d7dde7;
    font-size: 1rem;
    line-height: 1;
}
.psx-trustpilot__star.is-on {
    color: #00b67a;
}
.psx-trustpilot__badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #047857;
    background: rgba(0, 182, 122, 0.12);
    border-radius: 999px;
    padding: 0.22rem 0.5rem;
    white-space: nowrap;
}
.psx-trustpilot__badge--soft {
    color: #475569;
    background: rgba(100, 116, 139, 0.12);
}
.psx-trustpilot__card-title {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}
.psx-trustpilot__card-body {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #334155;
    flex: 1 1 auto;
}
.psx-trustpilot__card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.psx-trustpilot__author {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}
.psx-trustpilot__avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #00b67a 0%, #009f6b 100%);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.psx-trustpilot__name {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.psx-trustpilot__date {
    margin: 0.1rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}
.psx-trustpilot__read {
    font-size: 0.78rem;
    font-weight: 700;
    color: #00b67a;
    text-decoration: none;
    white-space: nowrap;
}
.psx-trustpilot__read:hover {
    color: #047857;
    text-decoration: underline;
}
.psx-trustpilot__cta-row {
    text-align: center;
    margin: 1.35rem 0 1.5rem;
}
.psx-trustpilot__see-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 182, 122, 0.35);
    background: #fff;
    color: #047857;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}
.psx-trustpilot__see-all:hover {
    background: rgba(0, 182, 122, 0.08);
    color: #065f46;
    text-decoration: none;
}
.psx-trustpilot__collector {
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem 1.1rem 0.85rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(15, 23, 42, 0.06);
}
.psx-trustpilot__collector-label {
    margin: 0 0 0.45rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}
.psx-trustpilot .trustpilot-widget {
    min-height: 52px;
}
@media (max-width: 1199px) {
    .psx-trustpilot__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 639px) {
    .psx-trustpilot__grid {
        grid-template-columns: 1fr;
    }
    .psx-trustpilot__card-top {
        flex-wrap: wrap;
    }
}

/* ── NEW professional footer (psx-foot-*) ─────────────────────────── */

/* Same max-width + side gutters as .site-header__inner so footer
   lines up with page content above. Footer logo asset is unchanged. */
.psx-foot-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 30px 2rem;
    align-items: flex-start;
    box-sizing: border-box;
}

/* Column base */
.psx-foot-col {
    flex: 1 1 200px;
    min-width: 0;
}

/* Brand column — wider; slight inset so logo/copy aren't flush left */
.psx-foot-brand {
    flex: 1.6 1 240px;
    padding-left: 1.25rem;
    box-sizing: border-box;
}
@media (min-width: 992px) {
    .psx-foot-brand {
        padding-left: 2rem;
    }
}
@media (max-width: 900px) {
    .psx-foot-inner {
        padding-left: 20px;
        padding-right: 20px;
    }
}
@media (max-width: 767px) {
    .psx-foot-brand {
        padding-left: 0.35rem;
    }
}

/* Logo */
.psx-foot-logo-wrap {
    display: inline-block;
    margin-bottom: 0.85rem;
}
.psx-foot-logo {
    width: 140px;
    height: auto;
    display: block;
    filter: brightness(1.05);
}

/* Tagline */
.psx-foot-tagline {
    color: #c8d0e0;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0.9rem;
    max-width: 300px;
}

/* Address */
.psx-foot-address {
    font-style: normal;
    color: #b0bbd0;
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 0.6rem;
}

/* Email link */
.psx-foot-email {
    display: inline-block;
    color: #8bbcf8;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.15s;
}
.psx-foot-email:hover {
    color: #c0d9ff;
    text-decoration: underline;
}

/* App store badges under brand contact — Apple left, Google right */
.psx-foot-stores {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.65rem;
}
.psx-foot-stores a {
    display: inline-flex;
    line-height: 0;
    text-decoration: none;
    opacity: 0.95;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.psx-foot-stores a:hover {
    opacity: 1;
    transform: translateY(-1px);
}
.psx-foot-store-badge {
    display: block;
    height: 40px;
    width: auto;
    max-width: 148px;
    object-fit: contain;
}

/* Column headings */
.psx-foot-heading {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255,255,255,0.15);
}

/* Link list */
.psx-foot-linklist {
    list-style: none;
    padding: 0;
    margin: 0;
}
.psx-foot-linklist li {
    margin-bottom: 0.55rem;
}
.psx-foot-linklist a {
    color: #b8c8de;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: color 0.15s, padding-left 0.15s;
    display: inline-block;
}
.psx-foot-linklist a:hover {
    color: #ffffff;
    padding-left: 4px;
}

/* Social icon circles */
.psx-foot-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.psx-foot-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #e0e8f4;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, transform 0.15s;
    border: 1px solid rgba(255,255,255,0.15);
}
.psx-foot-social a:hover {
    background: rgba(255,255,255,0.22);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Satisfaction badge */
.psx-foot-badge-link {
    display: inline-block;
}
.psx-foot-badge {
    max-width: 160px;
    height: auto;
    display: block;
    opacity: 0.92;
    transition: opacity 0.15s;
}
.psx-foot-badge:hover { opacity: 1; }

/* Bottom bar */
.psx-foot-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 30px 1.5rem;
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    box-sizing: border-box;
}
.psx-foot-copy {
    /* Glossy white on the purple footer: near-white with a faint highlight and a
       soft dark shadow so the line reads on both the light and dark ends of the
       gradient. Slate grey was invisible here. */
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.015em;
    margin: 0;
    text-align: center;
    text-shadow: 0 1px 1px rgba(15, 23, 42, 0.45), 0 0 18px rgba(255, 255, 255, 0.25);
}
.psx-pay-strip {
    padding: 0 !important;
}

/* Responsive — tablet (768–991px): 2+1 layout */
@media (min-width: 768px) and (max-width: 991px) {
    .psx-foot-brand  { flex: 0 0 100%; }
    .psx-foot-links,
    .psx-foot-social-col { flex: 1 1 calc(50% - 1.25rem); }
}

/* Responsive — mobile (≤767px): stacked */
@media (max-width: 767px) {
    /* Prevent footer from ever overflowing its own edges */
    .footerSection {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    .psx-foot-inner {
        padding: 2rem 1.25rem 1.5rem !important;
        gap: 2rem;
        width: 100% !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
    }
    .psx-foot-brand,
    .psx-foot-links,
    .psx-foot-social-col {
        flex: 0 0 100%;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    .psx-foot-tagline {
        max-width: 100% !important;
        word-break: break-word !important;
    }
    .psx-foot-address {
        word-break: break-word !important;
    }
    .psx-foot-bottom {
        padding: 1rem 1.25rem 1.5rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    /* Payment strip: never wider than screen */
    .footer-payment-strip-wrap {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 8px !important;
    }
    .footer-payment-strip-img {
        width: 100% !important;
        max-width: 300px !important;
        height: auto !important;
    }
}

/* -------------------------------------------------------
   9. Login / OTP modals – full width on tiny phones
   ------------------------------------------------------- */
@media (max-width: 479px) {
    .modal-dialog  { margin: 10px !important; }
    .modal-content { width: 100% !important; }
}

/* -------------------------------------------------------
   10. "With PaystubX" section – payimg2 overflow & text fix
   payimg2 base CSS: margin-left:-60px; margin-top:-156px.
   These negative offsets cause horizontal scroll on phones.
   ------------------------------------------------------- */
@media (max-width: 767px) {
    /* Reset the negative-margin trick that only works at one desktop size */
    .payimg2 {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 0 !important;
        padding-bottom: 16px !important;
    }
    /* The "On PaystubX" paragraph text */
    .img2-p {
        font-size: 15px !important;
        line-height: 1.7 !important;
    }
    /* Mobile phone preview image */
    img.payimg.mobile-img {
        width: 55% !important;
        max-width: 220px !important;
        margin: 0 auto 12px !important;
        display: block !important;
        padding-bottom: 0 !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    /* Soften the negative margin for tablet – image still overlaps tastefully */
    .payimg2 {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: -40px !important;
    }
    .img2-p {
        font-size: 16px !important;
        margin-left: 0 !important;
    }
}

/* -------------------------------------------------------
   11. paytext & smallfont – scale the mobile phone overlay
   .paytext shows via .mobile-img (only on ≤768px screens).
   Base: smallfont=25px, smallfont1=22px, smallfont2/3=30px.
   ------------------------------------------------------- */
@media (max-width: 767px) {
    .paytext {
        margin-top: 0 !important;   /* cancel the -47px overlap */
        padding: 8px 4px !important;
    }
    .smallfont  { font-size: 15px !important; line-height: 1.5 !important; }
    .smallfont1 { font-size: 13px !important; line-height: 1.4 !important; }
    .smallfont2 { font-size: 17px !important; line-height: 1.3 !important; }
    .smallfont3 { font-size: 17px !important; line-height: 1.4 !important; }
}

/* -------------------------------------------------------
   12. "Ready to Explore" list – scale 20px inline font
   The <ul> has font-size:20px inline; !important on <li>
   wins over inherited values, making it responsive.
   ------------------------------------------------------- */
@media (max-width: 767px) {
    ul.list-outer li {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    ul.list-outer li {
        font-size: 16px !important;
    }
}

/* -------------------------------------------------------
   13. Generate CTA button – overflow safety on tiny phones
   Base: width:312px. At 320px phone with 15px padding each
   side only 290px is available — the button overflows.
   ------------------------------------------------------- */
@media (max-width: 479px) {
    a.btn.Generate,
    .col-set a.btn.Generate {
        width: 88% !important;
        max-width: 88% !important;
        min-width: 0 !important;
        font-size: 1rem !important;
        padding: 10px 16px !important;
        display: inline-block !important;
    }
    /* Hero CTA stays compact — never inherit the 88% / inline-block rule above */
    .paystub .psx-hero-cta-row a.btn.Generate,
    .psx-hero-cta-row a.btn.Generate {
        width: auto !important;
        max-width: min(280px, 92%) !important;
        min-height: 48px !important;
        height: 48px !important;
        padding: 0 1.35rem !important;
        line-height: 1 !important;
        font-size: 1.12rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* -------------------------------------------------------
   14. Scroll-to-top floating button
   ------------------------------------------------------- */
.scroll-top-btn {
    position: fixed;
    /* Keep the scroll button above Crisp, including the expanded chat prompt. */
    right: 24px !important;
    bottom: 190px !important;
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f1f1;
    color: #2f3136;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    /* Above dashboard topbar/sidebar chrome; still below modal layers. */
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    /* --psx-scroll-lift is set from JS to hop the button above a page action bar
       (Save Draft / Preview / Generate) instead of covering its buttons. */
    transform: translateY(calc(8px - var(--psx-scroll-lift, 0px)));
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease, background-color 0.2s ease;
}

.scroll-top-btn i {
    font-size: 30px;
    line-height: 1;
}

.scroll-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(calc(-1 * var(--psx-scroll-lift, 0px)));
}

/* A floating panel (YTD tips / guide, drawer-style pops) owns the screen while
   it is open — the scroll button must not float on top of its copy. */
body.psx-panel-open #scrollTopBtn.scroll-top-btn,
body.psx-panel-open .scroll-top-btn {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Paystub create/edit forms (USA / Canada / UK / Global + invoice edit): the
   scroll FAB sits on Refresh / Generate / Save. Hide it on those pages only —
   marketing landings keep the button. */
body:has(#submit_form_paystubx_id) #scrollTopBtn.scroll-top-btn,
body:has(#submit_form_paystubx_id) .scroll-top-btn {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.scroll-top-btn:hover {
    background: #ffffff;
}

.scroll-top-btn:focus {
    outline: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18), 0 0 0 3px rgba(26, 106, 138, 0.2);
}

@media (max-width: 767px) {
    .scroll-top-btn {
        width: 46px;
        height: 46px;
        right: 14px !important;
        bottom: 170px !important;
    }
    .scroll-top-btn i {
        font-size: 22px;
    }
}

/* Extra-small phones (≤ 374px) */
@media (max-width: 374px) {
    .scroll-top-btn {
        width: 40px;
        height: 40px;
        right: 10px !important;
        bottom: 158px !important;
    }
    .scroll-top-btn i {
        font-size: 20px;
    }
}

/* ================================================================
   15. Auth modals (.axm-*) — source of truth is psx-auth-modals.css
       (dashboard omits responsive-form.css; login/logout still need .axm-*).
   ================================================================ */


/* Loader overlay/animation moved here from body <style> to avoid late repaint */
#loaderPanel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(300px, calc(100vw - 48px));
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
    padding: 28px 24px 24px;
    text-align: center;
    z-index: 10000;
}
#loader {
    position: relative;
    left: auto;
    top: auto;
    z-index: 1;
    width: 52px;
    height: 52px;
    margin: 0 auto 18px;
    border: 4px solid #e8edf5;
    border-radius: 50%;
    border-top: 4px solid #1a2e6e;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
}
#loaderMessage {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #0f1b3d;
    line-height: 1.35;
}
#loaderSubMessage {
    margin: 6px 0 0;
    font-size: 13px;
    color: #667085;
    line-height: 1.4;
}
@-webkit-keyframes spin {
    0% { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.animate-bottom {
    position: relative;
    -webkit-animation-name: animatebottom;
    -webkit-animation-duration: 1s;
    animation-name: animatebottom;
    animation-duration: 5s;
}
@-webkit-keyframes animatebottom {
    from { bottom: -100px; opacity: 0; }
    to { bottom: 0; opacity: 1; }
}
@keyframes animatebottom {
    from { bottom: -100px; opacity: 0; }
    to { bottom: 0; opacity: 1; }
}
#loaderDiv {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 26, 0.55);
    z-index: 9999;
}

/* ================================================================
   USA PAYSTUB FORM — Professional UI  (TurboTax / Payroll grade)
   Visual overrides only. IDs, names, data-*, JS hooks untouched.
   ================================================================ */

/* ── Soft page tint behind cards (like TurboTax / Gusto) ── */
.container.mt-2.px-0 {
    background: transparent !important;
    padding: 28px 20px 56px !important;
    border-radius: 0 !important;
}

/* ── Section cards: glossy silver gradient border + white surface ── */
.box-usa {
    background:
        linear-gradient(180deg, #ffffff 0%, #fafbfd 100%) padding-box,
        linear-gradient(145deg,
            #c8d4de  0%,
            #f0f4f7 22%,
            #a8b8c8 44%,
            #e8edf2 66%,
            #b8c8d8 88%,
            #edf0f4 100%
        ) border-box !important;
    border: 2px solid transparent !important;
    border-radius: 14px !important;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.95) inset,
        0 2px 6px rgba(140,158,175,0.14),
        0 6px 28px rgba(0,0,0,0.06) !important;
    padding: 22px 26px 26px !important;
    position: relative !important;
}

/* ── Section headings with Font Awesome icon prefix ── */
.box-h5 {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: 1.08rem !important;
    font-weight: 800 !important;
    color: #12263a !important;
    letter-spacing: 0.01em !important;
    padding: 0 0 12px 0 !important;
    margin-bottom: 12px !important;
    border: none !important;
    border-bottom: 2px solid #dfe7ef !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    line-height: 1.35 !important;
    text-transform: none !important;
}
/* Colored left accent replacing old left border */
.box-h5::before {
    content: '' !important;
    display: inline-block !important;
    width: 4px !important;
    height: 20px !important;
    background: linear-gradient(180deg, #1a6a8a, #2196b4) !important;
    border-radius: 3px !important;
    flex-shrink: 0 !important;
}
/* Font Awesome document icon after the accent bar */
.box-h5::after {
    font-family: 'FontAwesome' !important;
    content: '\f15c' !important;
    font-size: 15px !important;
    color: #1a6a8a !important;
    opacity: 0.7 !important;
    margin-left: auto !important;
    font-weight: 400 !important;
}

/* ── Form labels ── */
.lable {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: 10.5px !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    color: #475569 !important;
    margin-bottom: 5px !important;
    display: block !important;
    text-transform: uppercase !important;
}

/* ── Text inputs ── */
.input-box-font {
    border-radius: 8px !important;
    border: 1.5px solid #d0d9e3 !important;
    background: #f8fafc !important;
    padding: 10px 13px !important;
    font-size: 15px !important;
    color: #1a202c !important;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) inset !important;
}
.input-box-font:focus {
    border-color: #1a6a8a !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(26,106,138,0.10), 0 1px 2px rgba(0,0,0,0.04) inset !important;
    outline: none !important;
}
.input-box-font:hover:not(:focus) {
    border-color: #a8b8cc !important;
}

/* ── Selects / dropdowns with custom silver caret ── */
.dropdown11,
.dropdown1 {
    border-radius: 8px !important;
    border: 1.5px solid #d0d9e3 !important;
    background: #f8fafc !important;
    padding: 10px 36px 10px 13px !important;
    font-size: 15px !important;
    color: #1a202c !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' fill='%235a6a7a' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    transition: border-color 0.18s, box-shadow 0.18s !important;
    height: auto !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) inset !important;
}
.dropdown11:focus,
.dropdown1:focus {
    border-color: #1a6a8a !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(26,106,138,0.10), 0 1px 2px rgba(0,0,0,0.04) inset !important;
    outline: none !important;
}
.dropdown11:hover:not(:focus),
.dropdown1:hover:not(:focus) {
    border-color: #a8b8cc !important;
}

/* Override newstyle.css .form-control font-size (1.5rem far too large) */
#submit_form_paystubx_id .form-control {
    font-size: 15px !important;
    height: auto !important;
    line-height: 1.5 !important;
}

/* ── Input text visibility fix (all pages: USA, Canada, UK, Global) ──────────────
   newstyle.css rule at line 1187 sets background:#244b1f + color:white on
   ALL input:hover, making typed text invisible on every paystub form.
   #fname:hover (newstyle line 700) also sets a dark bg without a text colour.
   This single rule in responsive-fix.css (last loaded) fixes all pages at once —
   no per-page overrides needed, no duplicates.                                  */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):active {
    background: #fff !important;
    background-image: none !important;
    color: #333 !important;
}

/* .input-uk:hover sets white text on a dark red gradient — same fix */
.input-uk:hover,
.input-uk:focus {
    color: #1a2e3b !important;
    background-image: none !important;
    background: #f8fbfd !important;
    border: 1.5px solid #A8A8A8 !important;
}

/* ── Address-book inline selects ── */
.address_book,
.address_book_1 {
    border-radius: 6px !important;
    border: 1.5px solid #c8d4de !important;
    background: #edf2f7 !important;
    font-size: 13px !important;
    padding: 4px 10px !important;
    height: 34px !important;
    color: #1a202c !important;
    font-weight: 500 !important;
}

/* ── Address-book PNG icon ── */
img.address-book {
    width: 28px !important;
    height: 28px !important;
    opacity: 0.75 !important;
    transition: opacity 0.2s !important;
    cursor: pointer !important;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15)) !important;
}
img.address-book:hover { opacity: 1 !important; }

/* ── Eye icon (template preview toggle) ── */
.uk-eye {
    font-size: 26px !important;
    color: #1a6a8a !important;
    cursor: pointer !important;
    transition: color 0.2s, transform 0.15s !important;
    vertical-align: middle !important;
}
.uk-eye:hover {
    color: #d32f0c !important;
    transform: scale(1.12) !important;
}

/* ── Template section labels (BASIC / ADVANCED) ── */
.base {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: 0.1em !important;
    color: #12263a !important;
    text-transform: uppercase !important;
}
/* Advanced template heading (inline style override) */
#submit_form_paystubx_id h6[style*="margin-left"] {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: 0.1em !important;
    color: #12263a !important;
    text-transform: uppercase !important;
    margin-left: 0 !important;
}

/* ── Template divider ── */
.sh img {
    opacity: 0.35 !important;
    filter: grayscale(60%) !important;
    height: 160px !important;
}

/* ── Earning statement column header buttons ── */
.statementbtn {
    background: linear-gradient(180deg, #253d4e, #1a2e3b) !important;
    color: #e8f0f5 !important;
    border-radius: 6px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.6px !important;
    padding: 10px 5px !important;
    border: none !important;
    width: 100% !important;
    text-transform: uppercase !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18) !important;
}

/* ── Earning / deduction value cells ── */
.earnbtn,
.ukbtn,
.input-uk {
    background: #ffffff !important;
    border: 1.5px solid #C0C0C0 !important;
    color: #1a2e3b !important;
    font-weight: 600 !important;
    border-radius: 2px !important;
    font-size: 14px !important;
    padding: 8px 6px !important;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.85), 0 1px 2px rgba(0,0,0,0.06) !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}
.earnbtn:focus,
.ukbtn:focus,
.input-uk:focus {
    border-color: #A8A8A8 !important;
    outline: none !important;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.85), 0 0 0 3px rgba(192,192,192,0.18) !important;
    background: #f8fbfd !important;
}
.earnbtn:hover:not(:focus):not([type="button"]),
.ukbtn:hover:not(:focus):not([type="button"]),
.input-uk:hover:not(:focus):not([type="button"]) {
    border-color: #A8A8A8 !important;
}

/* ── Lock / unlock padlock — Font Awesome icon ── */
.psx-lock-icon {
    font-size: 17px !important;
    color: #4e6680 !important;
    cursor: pointer !important;
    opacity: 0.72 !important;
    transition: opacity 0.18s, color 0.18s, transform 0.15s !important;
    display: inline-block !important;
    line-height: 1 !important;
}
.psx-lock-icon:hover {
    opacity: 1 !important;
    color: #1a5276 !important;
}
.psx-lock-icon.fa-unlock-alt {
    color: #1a7a55 !important;
    opacity: 0.85 !important;
}

/* Deduction rows: align icon with input */
#submit_form_paystubx_id .taxes,
#submit_form_paystubx_id .psx-state-supplemental-row input[name="tax_deduction[]"] {
    padding-left: 38px !important;
    text-align: left !important;
}
#submit_form_paystubx_id .box-usa .col-md-4.col-lg-3.mb-3 {
    position: relative;
}
#submit_form_paystubx_id .box-usa .col-md-4.col-lg-3.mb-3 > .psx-lock-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}
#submit_form_paystubx_id .box-usa .col-md-4.col-lg-3.mb-3 > .psx-lock-icon:hover {
    transform: translateY(-50%) scale(1.2) !important;
}

/* UK padlock – single clean rule, perfectly centered like USA */
#submit_form_paystubx_id .col-md-7.col-lg-7.mb-3 .psx-lock-icon.lockuk {
    position: absolute !important;
    left: 16px !important;
    top: calc(50% + 3px) !important;
    transform: translateY(-50%) !important;
    z-index: 2 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    font-size: 17px !important;
    line-height: 1 !important;
}
#submit_form_paystubx_id .col-md-7.col-lg-7.mb-3 .input-uk {
    padding-left: 34px !important;
    text-align: left !important;
}

/* ── DEDUCTIONS section header button — match iOS #021891 ── */
.createbtn {
    background: #021891 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    padding: 10px 28px !important;
    border: none !important;
    letter-spacing: 0.4px !important;
    box-shadow: 0 2px 10px rgba(30,58,74,0.22) !important;
    transition: opacity 0.18s !important;
}
.createbtn:hover { opacity: 0.88 !important; }

/* ── Add Earning / Add Deduction — blue primary button ── */
.add_button.earnbtn,
.add_deduction.earnbtn,
.btnCommon.addEarningField,
.btnCommon.addTaxField,
.btnCommon.addUkDeduction,
.uk-add-btn {
    background: #021891 !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(2, 24, 145, 0.22) !important;
}
.add_button.earnbtn:hover,
.add_deduction.earnbtn:hover,
.btnCommon.addEarningField:hover,
.btnCommon.addTaxField:hover,
.btnCommon.addUkDeduction:hover {
    opacity: 0.9 !important;
    color: #ffffff !important;
}
.add_button.earnbtn .fa,
.add_deduction.earnbtn .fa,
.btnCommon.addEarningField .fa,
.btnCommon.addTaxField .fa,
.btnCommon.addUkDeduction .fa {
    color: #ffffff !important;
}

/* ── Net Pay / summary row labels — Android @color/blue (#021891) ── */
.netpaybtn {
    background: #021891 !important;
    color: #ffffff !important;
    border-radius: 2px !important;
    font-size: 19px !important;
    font-weight: 600 !important;
    padding: 8px 6px !important;
    border: none !important;
    box-shadow: none !important;
    letter-spacing: 0.3px !important;
    width: 100% !important;
    transition: opacity 0.18s !important;
}
.netpaybtn:hover { opacity: 0.9 !important; }

/* UK paystub section containers — silver borders (no red/orange) */
.pay-outer {
    border: 3px solid #C0C0C0 !important;
}

#submit_form_paystubx_id .input-uk,
#submit_form_paystubx_id select.input-uk {
    border: 1.5px solid #C0C0C0 !important;
}

/* ── Earning grid: THIS PERIOD / YTD TOTAL align with deduction columns ── */
/* USA + Canada: salary-only — hide RATE/HOURS columns entirely */
#submit_form_paystubx_id.psx-salary-earnings:not(.psx-salary-earnings-addons) .psx-earn-col-rate,
#submit_form_paystubx_id.psx-salary-earnings:not(.psx-salary-earnings-addons) .psx-earn-col-hours,
#submit_form_paystubx_id.psx-salary-earnings:not(.psx-salary-earnings-addons) .addrateKey.psx-earn-col-rate,
#submit_form_paystubx_id.psx-salary-earnings:not(.psx-salary-earnings-addons) .addhoursKey.psx-earn-col-hours {
    display: none !important;
}
/* Canada + USA: salary + add-ons — primary Salary row keeps RATE/HOURS blank (USA pattern) */
#submit_form_paystubx_id.psx-salary-earnings.psx-salary-earnings-addons .psx-ca-earn-primary-row .addrateKey > #rate_000,
#submit_form_paystubx_id.psx-salary-earnings.psx-salary-earnings-addons .psx-ca-earn-primary-row .addhoursKey > #hours_000,
#submit_form_paystubx_id.psx-salary-earnings.psx-salary-earnings-addons .psx-ca-earn-primary-row .addrateKey > .rateKey#rate_000,
#submit_form_paystubx_id.psx-salary-earnings.psx-salary-earnings-addons .psx-ca-earn-primary-row .addhoursKey > .hoursKey#hours_000 {
    display: none !important;
    visibility: hidden !important;
}
#submit_form_paystubx_id.psx-salary-earnings:not(.psx-salary-earnings-addons) .psx-earn-cols-row > .col-lg-2 {
    flex: 0 0 25%;
    max-width: 25%;
}

#submit_form_paystubx_id .psx-earn-cols-row > .col-lg-2 .statementbtn,
#submit_form_paystubx_id .psx-earn-cols-row > .col-lg-2 .earnbtn {
    width: 100% !important;
    box-sizing: border-box !important;
}
#submit_form_paystubx_id .psx-earn-cols-row .statementbtn {
    min-height: 2.25rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
#submit_form_paystubx_id .psx-earn-cols-row > .col-lg-2:nth-child(5),
#submit_form_paystubx_id .psx-earn-cols-row > .col-lg-2:nth-child(6) {
    position: relative;
}
#submit_form_paystubx_id .psx-earn-cols-row .psx-col-sub {
    position: absolute;
    top: 2.25rem;
    left: 0;
    right: 0;
    height: 1.5rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin: 0;
    padding: 0 2px 2px;
    pointer-events: none;
    z-index: 1;
}
#submit_form_paystubx_id .addincomeKey .psx-canada-earn-addon,
#submit_form_paystubx_id .addincomeKey .psx-uk-earn-addon {
    width: 100%;
}
/* UK — added earning rows: fixed 42px slots, column padding matches Regular row mt-3 */
#submit_form_paystubx_id #uk-earn-rows,
#submit_form_paystubx_id .uk-earn-row {
    overflow: visible !important;
}
#submit_form_paystubx_id .uk-earn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
#submit_form_paystubx_id .uk-earn-row > [class*="col-"] {
    box-sizing: border-box;
    overflow: visible !important;
    padding-top: 1rem !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
#submit_form_paystubx_id .uk-earn-row > .psx-uk-earn-total-col {
    position: relative;
}
#submit_form_paystubx_id .uk-earn-row .psx-earn-addon-cell.psx-uk-earn-slot {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 42px !important;
    height: 42px !important;
    max-height: 42px !important;
    display: flex !important;
    align-items: stretch !important;
    box-sizing: border-box;
    width: 100%;
    position: relative;
    overflow: visible !important;
}
#submit_form_paystubx_id .uk-earn-row .psx-uk-earn-slot .psx-uk-earn-addon,
#submit_form_paystubx_id .uk-earn-row .psx-uk-earn-slot .earnbtn,
#submit_form_paystubx_id .uk-earn-row .psx-uk-earn-slot select.uk-earning-sel,
#submit_form_paystubx_id .uk-earn-row .psx-uk-earn-slot .psx-earn-field-wrap {
    width: 100% !important;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 42px !important;
    height: 42px !important;
    max-height: 42px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
#submit_form_paystubx_id .uk-earn-row .psx-uk-earn-slot .psx-uk-earn-addon {
    display: flex;
    align-items: stretch;
}
#submit_form_paystubx_id .uk-earn-row .psx-uk-earn-slot select.uk-earning-sel {
    font-size: 14px !important;
    padding: 8px 6px !important;
    line-height: 1.2 !important;
}
#submit_form_paystubx_id .uk-earn-row .psx-uk-earn-slot .psx-earn-field-wrap {
    position: relative;
    overflow: visible !important;
}
#submit_form_paystubx_id .uk-earn-row .psx-uk-earn-slot .psx-earn-field-wrap > .earnbtn {
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
}
#submit_form_paystubx_id .uk-earn-row .psx-uk-earn-slot .psx-earn-remove-btn {
    top: 0;
    right: 0;
    transform: translate(50%, -40%);
}
#submit_form_paystubx_id .uk-earn-row .psx-uk-row-remove {
    top: 0 !important;
    right: 0 !important;
    transform: translate(40%, -40%) !important;
}
/* UK — added deduction rows: one wrapper row per pair (prevents double mb-3 stacking) */
#submit_form_paystubx_id .uk-extra-ded-pair {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}
#submit_form_paystubx_id .uk-extra-ded-pair > [class*="col-"] {
    box-sizing: border-box;
    overflow: visible !important;
    margin-bottom: 0 !important;
}
#submit_form_paystubx_id .uk-extra-ded-pair .uk-ded-name-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 13px;
}
#submit_form_paystubx_id .uk-extra-ded-pair .uk-deduction-sel,
#submit_form_paystubx_id .uk-extra-ded-pair .uk-deduction-custom {
    margin-bottom: 0 !important;
}
#submit_form_paystubx_id .uk-extra-ded-pair .uk-deduction-hint {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 1px 0 0 !important;
    padding: 0;
    font-size: 10px;
    line-height: 1.2;
    color: #666;
    text-align: left;
    text-transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#submit_form_paystubx_id .uk-extra-ded-pair .uk-deduction-config {
    margin-top: 4px;
}
#submit_form_paystubx_id .uk-extra-ded-pair [data-uk-ded-row] .psx-earn-addon-cell.psx-uk-earn-slot {
    margin: 0 !important;
    min-height: 38px !important;
    height: 38px !important;
}
/* UK deduction close — sit on input corner (deduction input is shorter than earning 42px slot) */
#submit_form_paystubx_id [data-uk-ded-row] .psx-uk-row-remove {
    top: 3px !important;
    right: 0 !important;
    transform: translate(40%, -22%) !important;
}
/* Canada — added earning rows: fixed slots, aligned with Salary/Regular row */
#submit_form_paystubx_id #ca-earn-rows {
    position: relative;
    z-index: 2;
    overflow: visible !important;
}
#submit_form_paystubx_id .ca-earn-row {
    overflow: visible !important;
}
#submit_form_paystubx_id .ca-earn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    position: relative;
    z-index: 2;
}
#submit_form_paystubx_id .ca-earn-row > [class*="col-"] {
    box-sizing: border-box;
    overflow: visible !important;
    padding-top: 1rem !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    z-index: 2;
}
#submit_form_paystubx_id .ca-earn-row > .psx-ca-earn-total-col {
    position: relative;
    overflow: visible !important;
}
#submit_form_paystubx_id .ca-earn-row .psx-ca-earn-total-col .psx-earn-field-wrap {
    position: relative;
    width: 100%;
    height: 42px;
    min-height: 42px;
    box-sizing: border-box;
    overflow: visible !important;
}
#submit_form_paystubx_id .ca-earn-row .psx-ca-earn-total-col .psx-earn-field-wrap > .currentTotal {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
#submit_form_paystubx_id .ca-earn-row .psx-ca-earn-total-col .psx-earn-remove-btn {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(40%, -40%) !important;
    z-index: 4;
}
#submit_form_paystubx_id .ca-earn-row .psx-earn-addon-cell.psx-ca-earn-slot {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 42px !important;
    height: 42px !important;
    max-height: 42px !important;
    display: flex !important;
    align-items: stretch !important;
    box-sizing: border-box;
    width: 100%;
    position: relative;
    overflow: visible !important;
}
#submit_form_paystubx_id .ca-earn-row .psx-ca-earn-slot .psx-canada-earn-addon,
#submit_form_paystubx_id .ca-earn-row .psx-ca-earn-slot .earnbtn,
#submit_form_paystubx_id .ca-earn-row .psx-ca-earn-slot select.ca-earning-sel {
    width: 100% !important;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 42px !important;
    height: 42px !important;
    max-height: 42px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
}
#submit_form_paystubx_id .ca-earn-row .psx-ca-earn-slot .psx-canada-earn-addon {
    display: flex;
    align-items: stretch;
}
#submit_form_paystubx_id .ca-earn-row .psx-ca-earn-slot select.ca-earning-sel {
    font-size: 14px !important;
    padding: 8px 6px !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    text-align: left !important;
    -webkit-appearance: menulist !important;
    appearance: menulist !important;
}
/* Rate / Hours values stay centered (Rate × Hours and Amount Only dash). */
#submit_form_paystubx_id .rateKey,
#submit_form_paystubx_id .hoursKey,
#submit_form_paystubx_id .psx-earn-col-rate input.earnbtn,
#submit_form_paystubx_id .psx-earn-col-hours input.earnbtn,
#submit_form_paystubx_id .addrateKey input.earnbtn,
#submit_form_paystubx_id .addhoursKey input.earnbtn {
    text-align: center !important;
}
#submit_form_paystubx_id .ca-earn-row .psx-earn-remove-btn,
#submit_form_paystubx_id .ca-earn-row .removebtn-canada-earning {
    pointer-events: auto !important;
}
/* Canada / UK 4-column earning rows — align added cells with first row */
#submit_form_paystubx_id .addincomeKey .psx-earn-addon-cell,
#submit_form_paystubx_id .addrateKey .psx-earn-addon-cell,
#submit_form_paystubx_id .addhoursKey .psx-earn-addon-cell,
#submit_form_paystubx_id .addcurrentTotal .psx-earn-addon-cell {
    min-height: 52px;
    margin-bottom: 1rem !important;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}
#submit_form_paystubx_id .addincomeKey .psx-earn-addon-cell > .psx-canada-earn-addon,
#submit_form_paystubx_id .addincomeKey .psx-earn-addon-cell > .psx-uk-earn-addon,
#submit_form_paystubx_id .addrateKey .psx-earn-addon-cell > .earnbtn,
#submit_form_paystubx_id .addrateKey .psx-earn-addon-cell > .psx-earn-field-wrap,
#submit_form_paystubx_id .addhoursKey .psx-earn-addon-cell > .earnbtn,
#submit_form_paystubx_id .addcurrentTotal .psx-earn-addon-cell > .psx-earn-field-wrap,
#submit_form_paystubx_id .addcurrentTotal .psx-earn-addon-cell > .earnbtn {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    min-height: 38px;
    box-sizing: border-box;
}
#submit_form_paystubx_id .addincomeKey select.ca-earning-sel,
#submit_form_paystubx_id .addincomeKey .ca-earn-custom,
#submit_form_paystubx_id .addincomeKey select.uk-earning-sel,
#submit_form_paystubx_id .addincomeKey .uk-earn-custom {
    width: 100% !important;
    min-height: 38px !important;
    box-sizing: border-box !important;
    margin-top: 0 !important;
}
/* Earning row remove — Android-style red circle on field edge (all regions) */
.psx-earn-field-wrap {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}
.psx-earn-field-wrap > .earnbtn,
.psx-earn-field-wrap > input.earnbtn,
.psx-earn-field-wrap > select.earnbtn,
.psx-earn-field-wrap > .input-uk {
    width: 100%;
    box-sizing: border-box;
}
.psx-earn-remove-btn {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(40%, -40%);
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #e53935;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    z-index: 3;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
    flex-shrink: 0;
}
.psx-earn-remove-btn span {
    font-size: 15px !important;
    font-weight: 700;
    line-height: 1;
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}
.psx-earn-remove-btn:hover {
    background: #c62828;
}
#submit_form_paystubx_id .addcurrentTotal,
#submit_form_paystubx_id .addrateKey,
#submit_form_paystubx_id .addtaxes_ytd,
#submit_form_paystubx_id .psx-earn-ytd-cell,
#submit_form_paystubx_id .uk-earn-row > .psx-uk-earn-total-col,
#submit_form_paystubx_id #uk-earn-rows,
#submit_form_paystubx_id [data-uk-ded-row].col-md-5,
#submit_form_paystubx_id [data-uk-ded-row].col-lg-5 {
    overflow: visible !important;
}
/* Ensure ancestors of dynamic deduction cols don't clip the remove circle */
#submit_form_paystubx_id .ukpay-inner .row {
    overflow: visible !important;
}
/* UK deduction close icon anchor — same slot class as Add Earning, close-only rules */
#submit_form_paystubx_id [data-uk-ded-row] .psx-earn-addon-cell.psx-uk-earn-slot {
    position: relative;
    overflow: visible !important;
    width: 100%;
}
/* Added earning rows: equal cell height across all 6 columns (prevents row drift) */
#submit_form_paystubx_id .psx-earn-cols-row .psx-earn-addon-cell {
    min-height: 52px;
    margin-bottom: 8px !important;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}
#submit_form_paystubx_id .psx-earn-cols-row .psx-earn-addon-cell > .earnbtn,
#submit_form_paystubx_id .psx-earn-cols-row .psx-earn-addon-cell > select.earnbtn {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    min-height: 38px;
    box-sizing: border-box;
}
#submit_form_paystubx_id .psx-earn-cols-row .psx-earn-ytd-cell {
    gap: 6px;
}
#submit_form_paystubx_id .psx-earn-cols-row .psx-earn-ytd-cell > .ytd_total {
    flex: 1 1 auto;
    min-width: 0;
}
#submit_form_paystubx_id .psx-summary-grid-row {
    align-items: center;
    padding-top: 1.35rem;
}
#submit_form_paystubx_id .psx-summary-grid-row > .col-lg-2:nth-child(2),
#submit_form_paystubx_id .psx-summary-grid-row > .col-lg-2:nth-child(3),
#submit_form_paystubx_id .psx-summary-grid-row > .col-md-2:nth-child(2),
#submit_form_paystubx_id .psx-summary-grid-row > .col-md-2:nth-child(3) {
    position: relative;
}
#submit_form_paystubx_id .psx-summary-grid-row .psx-col-sub {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 1.35rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin: 0;
    padding: 0 2px 2px;
    pointer-events: none;
    z-index: 1;
}

/* Column micro-labels (Total Gross / YTD Total Gross / Net Pay …). One token so
   they read as labels next to the .lable fields instead of default serif body text.
   .psx-col-sub sits in an absolute slot (create forms); .psx-field-sub stays in
   normal flow (edit forms), where its fixed height keeps the inputs aligned with
   the neighbouring mt-4 columns. */
#submit_form_paystubx_id .psx-col-sub,
#submit_form_paystubx_id .psx-field-sub {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.15;
    text-align: center;
    color: #475569;
}
#submit_form_paystubx_id .psx-field-sub {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 22px;
    pointer-events: none;
}

/* Template-field labels (CHECK NUMBER, BANK NAME …). The USA edit form renders
   these inline instead of including partials.psx-template-fields-panel, so it
   never loads that partial's stylesheet — keep the token here to match. */
#submit_form_paystubx_id .psx-tmpl-field__label {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #374151;
    line-height: 1.2;
}
#submit_form_paystubx_id .psx-deduction-grid-row > .col-lg-8,
#submit_form_paystubx_id .psx-summary-grid-row > .col-lg-8,
#submit_form_paystubx_id .psx-deduction-grid-row > .col-md-8,
#submit_form_paystubx_id .psx-summary-grid-row > .col-md-8 {
    flex: 0 0 auto;
    width: 66.666667%;
    max-width: 66.666667%;
    box-sizing: border-box;
}
#submit_form_paystubx_id .psx-deduction-grid-row > .col-lg-2,
#submit_form_paystubx_id .psx-summary-grid-row > .col-lg-2,
#submit_form_paystubx_id .psx-deduction-grid-row > .col-md-2,
#submit_form_paystubx_id .psx-summary-grid-row > .col-md-2 {
    flex: 0 0 auto;
    width: 16.666667%;
    max-width: 16.666667%;
    box-sizing: border-box;
}
/* Orphan hidden-field column wrappers must not shift the deduction grid */
#submit_form_paystubx_id .box-usa > .col-lg-2.margin-bottom:has(> input[type="hidden"]),
#submit_form_paystubx_id .box-usa > .col-md-2.margin-bottom:has(> input[type="hidden"]) {
    display: none !important;
    width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}
/* Deduction label column: padlock inside cell (original overlay layout) */
#submit_form_paystubx_id .psx-deduction-grid-row > .col-md-8.col-lg-8.mb-3 {
    position: relative;
}
#submit_form_paystubx_id .psx-deduction-grid-row > .col-md-8 > .psx-lock-icon,
#submit_form_paystubx_id .psx-deduction-grid-row > .col-lg-8 > .psx-lock-icon {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 2 !important;
}
#submit_form_paystubx_id .psx-deduction-grid-row > .col-md-8 > .psx-lock-icon:hover,
#submit_form_paystubx_id .psx-deduction-grid-row > .col-lg-8 > .psx-lock-icon:hover {
    transform: translateY(-50%) scale(1.2) !important;
}

/* USA deduction lock helper — secondary copy under DEDUCTIONS */
#submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-lock-hint {
    margin: 2px 0 10px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.35;
    color: #64748b;
}
/* Deduction Explanation ⓘ — far-right of label cell; does not move padlock/layout */
#submit_form_paystubx_id .psx-deduction-grid-row > .col-md-8.col-lg-8.mb-3.has-psx-deduction-explain > input.earnbtn,
#submit_form_paystubx_id .psx-deduction-grid-row > .col-md-8.has-psx-deduction-explain > input.earnbtn,
#submit_form_paystubx_id .psx-deduction-label-cell.has-psx-deduction-explain > input.earnbtn,
#submit_form_paystubx_id .psx-deduction-label-cell.has-psx-deduction-explain > input.taxes,
#submit_form_paystubx_id .psx-deduction-label-cell.has-psx-deduction-explain > input.input-uk {
    padding-right: 34px !important;
}
.psx-deduction-explain-icon {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 3 !important;
    border: 0;
    background: transparent;
    color: #3b6ea5;
    padding: 4px;
    line-height: 1;
    cursor: pointer;
    font-size: 15px;
}
.psx-deduction-explain-icon:hover,
.psx-deduction-explain-icon:focus {
    color: #1e4f86;
    outline: none;
}
.psx-deduction-explain-popover {
    position: absolute;
    z-index: 10050;
    background: #fff;
    border: 1px solid #d7dee8;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
    padding: 14px 16px 12px;
    color: #1f2937;
    font-size: 13px;
    line-height: 1.45;
}
.psx-deduction-explain-close {
    position: absolute;
    top: 6px;
    right: 8px;
    border: 0;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
}
.psx-deduction-explain-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 4px;
    padding-right: 18px;
}
.psx-deduction-explain-summary {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}
.psx-deduction-explain-detail {
    margin: 0 0 10px;
    color: #334155;
}
.psx-deduction-explain-meta {
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
}
.psx-deduction-explain-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
    color: #475569;
}
.psx-deduction-explain-meta-row strong {
    color: #0f172a;
    font-weight: 650;
    text-align: right;
}
/* Summary totals row: align value columns with deduction amount columns above */
#submit_form_paystubx_id .psx-summary-grid-row {
    align-items: flex-end;
    padding-top: 1.35rem;
}
#submit_form_paystubx_id .psx-summary-grid-row > .col-md-8,
#submit_form_paystubx_id .psx-summary-grid-row > .col-lg-8,
#submit_form_paystubx_id .psx-summary-grid-row > .col-md-2,
#submit_form_paystubx_id .psx-summary-grid-row > .col-lg-2 {
    margin-bottom: 1rem !important;
}
#submit_form_paystubx_id .psx-summary-grid-row .deduction_tax,
#submit_form_paystubx_id .psx-summary-grid-row .ytd_deduction_tax,
#submit_form_paystubx_id .psx-summary-grid-row .total_net_pay,
#submit_form_paystubx_id .psx-summary-grid-row .total_ytd_net_pay,
#submit_form_paystubx_id .psx-deduction-grid-row .manualTaxTotal,
#submit_form_paystubx_id .psx-deduction-grid-row .tax_deduction,
#submit_form_paystubx_id .psx-deduction-grid-row .ytd_tax {
    width: 100% !important;
    box-sizing: border-box !important;
}
#submit_form_paystubx_id .psx-deduction-grid-row > .col-md-2.relative > .earnbtn,
#submit_form_paystubx_id .psx-deduction-grid-row > .col-lg-2.relative > .earnbtn {
    padding-right: 28px !important;
}

/* Deduction Calculation Method:
   Desktop = native dropdown. Mobile/tablet (≤1023) = segmented Fixed Amount | Percentage.
   Same select.psx-deduction-calc-type stays wired for form/state. */
#submit_form_paystubx_id .psx-deduction-calc-method {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 8px 0 0;
    box-sizing: border-box;
}

/* Desktop / wide: dropdown only — hide segment chrome */
@media (min-width: 1024px) {
    #submit_form_paystubx_id .psx-deduction-calc-method > .psx-calc-method__label,
    #submit_form_paystubx_id .psx-deduction-calc-method > .psx-calc-method__seg {
        display: none !important;
    }
    #submit_form_paystubx_id .psx-deduction-calc-method > select.psx-deduction-calc-type {
        position: static !important;
        display: block !important;
        width: 100% !important;
        max-width: 160px !important;
        height: 42px !important;
        min-height: 42px !important;
        margin: 0 !important;
        padding: 8px 10px !important;
        clip: auto !important;
        overflow: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        border: 1.5px solid #C0C0C0 !important;
        border-radius: 2px !important;
        background: #fff !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        box-sizing: border-box !important;
        -webkit-appearance: menulist !important;
        appearance: menulist !important;
        cursor: pointer !important;
    }
    #submit_form_paystubx_id .psx-deduction-calc-method + .psx-deduction-percentage:not(.d-none),
    #submit_form_paystubx_id .psx-deduction-calc-method + input.psx-deduction-percentage:not(.d-none) {
        display: inline-block !important;
        width: auto !important;
        max-width: 140px !important;
        margin: 8px 0 0 6px !important;
        vertical-align: top;
    }
}

/* Phone + tablet: segment only — clip native select (still in DOM for wiring) */
@media (max-width: 1023.98px) {
    #submit_form_paystubx_id .psx-deduction-calc-method > .psx-calc-method__label,
    #submit_form_paystubx_id .psx-deduction-calc-method > .psx-calc-method__seg {
        display: block !important;
    }
    #submit_form_paystubx_id .psx-deduction-calc-method > .psx-calc-method__seg {
        display: grid !important;
    }
    #submit_form_paystubx_id .psx-deduction-calc-method > select.psx-deduction-calc-type {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        border: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    #submit_form_paystubx_id .psx-deduction-calc-method + .psx-deduction-percentage:not(.d-none),
    #submit_form_paystubx_id .psx-deduction-calc-method + input.psx-deduction-percentage:not(.d-none) {
        margin-top: 12px !important;
    }
    #submit_form_paystubx_id .psx-deduction-calc-method:has(+ .psx-deduction-percentage:not(.d-none)),
    #submit_form_paystubx_id .psx-deduction-calc-method:has(+ input.psx-deduction-percentage:not(.d-none)) {
        padding-bottom: 12px !important;
    }
}
#submit_form_paystubx_id .psx-summary-grid-row > .col-md-8 > .earnbtn,
#submit_form_paystubx_id .psx-summary-grid-row > .col-lg-8 > .earnbtn,
#submit_form_paystubx_id .psx-summary-grid-row > .col-md-8 > .netpaybtn {
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 0 !important;
}

/* ── Hourly / Salary toggle — professional paired buttons (all regions) ── */
#submit_form_paystubx_id .hour_btn,
#submit_form_paystubx_id .salary_btn,
.hour_btn,
.salary_btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    min-width: 110px !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 22px !important;
    margin: 0 4px 0 0 !important;
    background: #ffffff !important;
    color: #1a2e3b !important;
    border: 1.5px solid #1a2e3b !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    text-shadow: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#submit_form_paystubx_id .hour_btn:last-of-type,
#submit_form_paystubx_id .salary_btn:last-of-type,
.hour_btn:last-of-type,
.salary_btn:last-of-type {
    margin-right: 0 !important;
}

/* Active / selected (class date_select is the existing wiring hook — do not rename) */
#submit_form_paystubx_id .hour_btn.date_select,
#submit_form_paystubx_id .salary_btn.date_select,
.hour_btn.date_select,
.salary_btn.date_select {
    background: linear-gradient(180deg, #d64a3d 0%, #b42318 48%, #9a1c14 100%) !important;
    color: #ffffff !important;
    border-color: #7f160f !important;
    box-shadow:
        0 3px 10px rgba(180, 35, 24, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2) !important;
}

#submit_form_paystubx_id .hour_btn:hover:not(.date_select),
#submit_form_paystubx_id .salary_btn:hover:not(.date_select),
.hour_btn:hover:not(.date_select),
.salary_btn:hover:not(.date_select) {
    background: #f8fafc !important;
    border-color: #0f172a !important;
}

#submit_form_paystubx_id .hour_btn.date_select:hover,
#submit_form_paystubx_id .salary_btn.date_select:hover,
.hour_btn.date_select:hover,
.salary_btn.date_select:hover {
    filter: brightness(1.04);
}

#submit_form_paystubx_id .hour_btn:focus-visible,
#submit_form_paystubx_id .salary_btn:focus-visible,
.hour_btn:focus-visible,
.salary_btn:focus-visible {
    outline: 2px solid #1a4e9e !important;
    outline-offset: 2px !important;
}

/* Keep the HOURLY | SALARY pair intact (kill scattered inline margins) */
#submit_form_paystubx_id .hour_btn[style],
#submit_form_paystubx_id .salary_btn[style],
.hour_btn[style],
.salary_btn[style] {
    margin-right: 4px !important;
}

/* Canada: Hourly/Salary toggle in Employee Basic Info (above pay dates) */
.psx-ca-pay-type-toggle {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 4px !important;
    margin-top: 4px;
    width: 100%;
}
.psx-ca-pay-type-toggle .hour_btn,
.psx-ca-pay-type-toggle .salary_btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 110px !important;
    margin: 0 !important;
}

/* Canada Employee Basic Info — desktop only: fill unused right-side width */
@media (min-width: 992px) {
    #submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa > .row {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Visible field columns share the row evenly (3→⅓, 2→½, 1→full) */
    #submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa > .row > [class*='col-']:not(.d-none) {
        flex: 1 1 0 !important;
        max-width: none !important;
        width: auto !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        box-sizing: border-box !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa > .row > [class*='col-']:not(.d-none):first-child {
        padding-left: 0 !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa > .row > [class*='col-']:not(.d-none):last-child {
        padding-right: 0 !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa .dropdown11,
    #submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa .select-dropdown,
    #submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa input.input-box-font,
    #submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa input.w-100 {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Canada Employee Basic Info — left-align values (override newstyle select { text-align:center }) */
#submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa select,
#submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa select.dropdown11,
#submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa select.select-dropdown,
#submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa input.input-box-font,
#submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa input.w-100,
#submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa input.textInputFontSize,
#submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa input.datepicker {
    text-align: left !important;
    text-align-last: left !important;
}

#submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa select.dropdown11,
#submit_form_paystubx_id.psx-paystub-form--canada #psx-basic-info-title + .box-usa select.select-dropdown {
    padding-left: 13px !important;
    padding-right: 36px !important;
}

/* USA Employee Basic Info — left-align values (title sits above .row > .box-usa) */
#submit_form_paystubx_id.psx-paystub-form--usa #psx-basic-info-title + .row .box-usa select,
#submit_form_paystubx_id.psx-paystub-form--usa #psx-basic-info-title + .row .box-usa select.dropdown11,
#submit_form_paystubx_id.psx-paystub-form--usa #psx-basic-info-title + .row .box-usa select.select-dropdown,
#submit_form_paystubx_id.psx-paystub-form--usa #psx-basic-info-title + .row .box-usa input.input-box-font,
#submit_form_paystubx_id.psx-paystub-form--usa #psx-basic-info-title + .row .box-usa input.w-100,
#submit_form_paystubx_id.psx-paystub-form--usa #psx-basic-info-title + .row .box-usa input.textInputFontSize,
#submit_form_paystubx_id.psx-paystub-form--usa #psx-basic-info-title + .row .box-usa input.datepicker {
    text-align: left !important;
    text-align-last: left !important;
}

#submit_form_paystubx_id.psx-paystub-form--usa #psx-basic-info-title + .row .box-usa select.dropdown11,
#submit_form_paystubx_id.psx-paystub-form--usa #psx-basic-info-title + .row .box-usa select.select-dropdown {
    padding-left: 13px !important;
    padding-right: 36px !important;
}

/* Global Basic Information — left-align values (override newstyle select { text-align:center }) */
#submit_form_paystubx_id.psx-paystub-form--global .psx-global-basic-info select,
#submit_form_paystubx_id.psx-paystub-form--global .psx-global-basic-info select.dropdown11,
#submit_form_paystubx_id.psx-paystub-form--global .psx-global-basic-info select.select-dropdown,
#submit_form_paystubx_id.psx-paystub-form--global .psx-global-basic-info select.input-box-font,
#submit_form_paystubx_id.psx-paystub-form--global .psx-global-basic-info #currency_code {
    text-align: left !important;
    text-align-last: left !important;
}

#submit_form_paystubx_id.psx-paystub-form--global .psx-global-basic-info select.dropdown11,
#submit_form_paystubx_id.psx-paystub-form--global .psx-global-basic-info select.select-dropdown,
#submit_form_paystubx_id.psx-paystub-form--global .psx-global-basic-info #currency_code {
    padding-left: 13px !important;
    padding-right: 36px !important;
}

/* Canada: collapsed “view more” for optional / regional tax fields */
#submit_form_paystubx_id.psx-paystub-form--canada .psx-ca-more-tax-options {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    background: #fcfdfe;
}
#submit_form_paystubx_id.psx-paystub-form--canada .psx-ca-more-tax-options > summary {
    list-style: none;
    color: #0b1f4d;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}
#submit_form_paystubx_id.psx-paystub-form--canada .psx-ca-more-tax-options > summary::-webkit-details-marker {
    display: none;
}
#submit_form_paystubx_id.psx-paystub-form--canada .psx-ca-more-tax-options > summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 6px;
    color: #64748b;
}
#submit_form_paystubx_id.psx-paystub-form--canada .psx-ca-more-tax-options[open] > summary::before {
    content: '▾';
}
    background: linear-gradient(135deg, #a81f07, #cc2f0c) !important;
    color: #ffffff !important;
    border-radius: 9px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    padding: 13px 38px !important;
    border: none !important;
    box-shadow: 0 3px 14px rgba(204,47,12,0.28) !important;
    transition: opacity 0.18s, transform 0.15s !important;
    letter-spacing: 0.3px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.previewbtn:hover {
    background: linear-gradient(135deg, #8e1a06, #b02208) !important;
    color: #ffffff !important;
    opacity: 0.95 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 18px rgba(204,47,12,0.32) !important;
}

/* ── Email / Download CTA button ── */
.emailbtn {
    background: linear-gradient(135deg, #0e6e44, #18934f) !important;
    color: #ffffff !important;
    border-radius: 9px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    padding: 13px 38px !important;
    border: none !important;
    box-shadow: 0 3px 14px rgba(24,147,79,0.28) !important;
    transition: opacity 0.18s, transform 0.15s !important;
    letter-spacing: 0.3px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.emailbtn:hover {
    background: linear-gradient(135deg, #09472e, #0f6636) !important;
    color: #ffffff !important;
    opacity: 0.95 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 18px rgba(24,147,79,0.32) !important;
}

/* ── Bottom CTA bar ── */
.usa-btn-inner,
.psx-paystub-actions {
    gap: 14px !important;
    flex-wrap: wrap !important;
    padding: 8px 0 4px !important;
    width: 100% !important;
}

/* ── Professional paystub action toolbar (create / edit) ── */
.psx-paystub-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 14px 16px !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06) !important;
}
.psx-paystub-toolbar__status {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: min(100%, 240px);
    flex: 1 1 220px;
    text-align: left;
}
.psx-paystub-toolbar__status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: 1px;
    border-radius: 50%;
    background: #e8f5ee;
    color: #1f7a4d;
    border: 1.5px solid #2f8f5b;
    flex: 0 0 28px;
    font-size: 13px;
}
.psx-paystub-toolbar.is-dirty .psx-paystub-toolbar__status-icon,
.psx-paystub-toolbar.is-saving .psx-paystub-toolbar__status-icon {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fb923c;
}
.psx-paystub-toolbar.is-dirty .psx-paystub-toolbar__status-icon .fa:before,
.psx-paystub-toolbar.is-saving .psx-paystub-toolbar__status-icon .fa:before {
    content: "\f017"; /* clock */
}
.psx-paystub-toolbar__status-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
}
.psx-paystub-toolbar__status-hint {
    margin-top: 2px;
    font-size: 12.5px;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.35;
}
.psx-paystub-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 1 1 auto;
}
.psx-paystub-toolbar__btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 44px !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    line-height: 1.2 !important;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    white-space: nowrap !important;
    margin: 0 !important;
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
}
.psx-paystub-toolbar__btn .fa {
    font-size: 15px !important;
    margin: 0 !important;
    line-height: 1 !important;
}
.psx-paystub-toolbar__btn--secondary {
    background: #ffffff !important;
    color: #0b1f4d !important;
    border: 1.5px solid #d1d5db !important;
    box-shadow: none !important;
}
.psx-paystub-toolbar__btn--secondary:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #0b1f4d !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}
/* Override legacy full-bleed preview/generate styles inside toolbar */
.psx-paystub-toolbar .previewbtn.psx-paystub-toolbar__btn--secondary,
.psx-paystub-toolbar .previewbtn {
    background: #ffffff !important;
    color: #0b1f4d !important;
    border: 1.5px solid #d1d5db !important;
    box-shadow: none !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
}
.psx-paystub-toolbar .previewbtn:hover {
    background: #f8fafc !important;
    color: #0b1f4d !important;
    border-color: #94a3b8 !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}
.psx-paystub-toolbar__split {
    display: inline-flex;
    align-items: stretch;
    position: relative;
    border-radius: 10px;
    overflow: visible;
    box-shadow: 0 2px 10px rgba(31, 122, 77, 0.22);
}
.psx-paystub-toolbar__btn--primary,
.psx-paystub-toolbar .emailbtn.psx-paystub-toolbar__btn--primary,
.psx-paystub-toolbar .emailbtn {
    background: #2f8f5b !important;
    background-image: none !important;
    color: #ffffff !important;
    border: 1.5px solid #2f8f5b !important;
    border-right: none !important;
    border-radius: 10px 0 0 10px !important;
    box-shadow: none !important;
    padding: 10px 18px !important;
    font-size: 14px !important;
}
.psx-paystub-toolbar__btn--primary:hover,
.psx-paystub-toolbar .emailbtn:hover {
    background: #247a4c !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: #247a4c !important;
    transform: none !important;
    box-shadow: none !important;
}
.psx-paystub-toolbar__btn--primary-caret {
    background: #2f8f5b !important;
    color: #ffffff !important;
    border: 1.5px solid #2f8f5b !important;
    border-left: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 0 10px 10px 0 !important;
    padding: 10px 12px !important;
    min-width: 40px !important;
    box-shadow: none !important;
}
.psx-paystub-toolbar__btn--primary-caret:hover {
    background: #247a4c !important;
    color: #ffffff !important;
    border-color: #247a4c !important;
}
.psx-paystub-toolbar__menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    padding: 8px;
    z-index: 40;
    text-align: left;
}
.psx-paystub-toolbar__menu[hidden] {
    display: none !important;
}
.psx-paystub-toolbar__menu-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: #0b1f4d;
    cursor: pointer;
}
.psx-paystub-toolbar__menu-item:hover {
    background: #f3f4f6;
}
.psx-paystub-toolbar__menu-note {
    margin: 6px 4px 2px;
    font-size: 11.5px;
    line-height: 1.4;
    color: #64748b;
}
@media (max-width: 767px) {
    /*
      Mobile stacks the toolbar as a COLUMN. Desktop flex values then become HEIGHT:
      - justify-content: space-between + flex: 1 1 220px on status → giant empty gap
      Reset to content-sized stack (phone only; desktop ≥768 unchanged).
    */
    .psx-paystub-toolbar {
        padding: 12px !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 16px !important;
        height: auto !important;
        min-height: 0 !important;
        flex-grow: 0 !important;
    }
    .psx-paystub-toolbar__status {
        flex: 0 0 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }
    .psx-paystub-toolbar__actions {
        width: 100%;
        flex: 0 0 auto !important;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin: 0 !important;
    }
    .psx-paystub-toolbar__btn,
    .psx-paystub-toolbar .previewbtn,
    .psx-paystub-toolbar .psx-paystub-save-draft {
        width: 100% !important;
        justify-content: center !important;
    }
    .psx-paystub-toolbar__split {
        display: flex !important;
        width: 100%;
        align-items: stretch;
    }
    /* Do NOT force .emailbtn to width:100% — that breaks the split caret */
    .psx-paystub-toolbar__btn--primary,
    .psx-paystub-toolbar .emailbtn {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: none !important;
    }
    .psx-paystub-toolbar__btn--primary-caret {
        flex: 0 0 48px !important;
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
    }
}

/* Canada / UK / Global: match USA breathing room below Preview / Generate */
.psx-paystub-form--canada .usa-btn,
.psx-paystub-form--canada .psx-paystub-actions,
.psx-paystub-form--uk .uk-bottom-btn,
.psx-paystub-form--uk .canada-btn-inner,
.psx-paystub-form--uk .psx-paystub-actions,
.psx-paystub-form--global .psx-global-btn-bar,
.psx-paystub-form--global .psx-paystub-actions {
    padding-bottom: 1.25rem !important;
    margin-bottom: 0.75rem !important;
}

/* Global: primary CTAs on row 1; Draft/Review on row 2 (avoid 4-button flex smash) */
.psx-paystub-form--global .psx-global-btn-bar {
    padding-right: 4.5rem;
    box-sizing: border-box;
}
.psx-paystub-form--global .psx-global-btn-primary {
    margin-bottom: 0 !important;
}
.psx-paystub-form--global .psx-global-btn-primary .previewbtn,
.psx-paystub-form--global .psx-global-btn-primary .emailbtn {
    margin-bottom: 0.75rem !important;
}
.psx-paystub-form--global .psx-global-btn-secondary {
    gap: 12px;
    width: 100%;
    padding: 0 0 0.25rem;
    box-sizing: border-box;
}
.psx-paystub-form--global .psx-global-btn-secondary .btn {
    min-height: 48px;
    min-width: 160px;
    flex: 1 1 180px;
    max-width: 280px;
    font-weight: 600;
    border-radius: 9px;
    padding: 11px 20px;
    box-sizing: border-box;
}
.psx-paystub-form--global .psx-global-btn-note {
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
    padding: 0 0.25rem 0.5rem;
}
@media (max-width: 767px) {
    .psx-paystub-form--global .psx-global-btn-bar {
        padding-right: 0;
    }
    .psx-paystub-form--global .psx-global-btn-secondary {
        flex-direction: column;
        align-items: stretch;
    }
    .psx-paystub-form--global .psx-global-btn-secondary .btn {
        max-width: none;
        width: 100%;
        flex: 1 1 auto;
    }
}

@media (min-width: 768px) {
    #submit_form_paystubx_id .psx-paystub-actions:not(.psx-paystub-toolbar),
    #submit_form_paystubx_id .usa-btn-inner:not(.psx-paystub-toolbar),
    #submit_form_paystubx_id .canada-btn-inner:not(.psx-paystub-toolbar) {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: stretch !important;
        gap: 16px !important;
    }
    #submit_form_paystubx_id .psx-paystub-actions:not(.psx-paystub-toolbar) .previewbtn,
    #submit_form_paystubx_id .psx-paystub-actions:not(.psx-paystub-toolbar) .emailbtn,
    #submit_form_paystubx_id .usa-btn-inner:not(.psx-paystub-toolbar) .previewbtn,
    #submit_form_paystubx_id .usa-btn-inner:not(.psx-paystub-toolbar) .emailbtn,
    #submit_form_paystubx_id .canada-btn-inner:not(.psx-paystub-toolbar) .previewbtn,
    #submit_form_paystubx_id .canada-btn-inner:not(.psx-paystub-toolbar) .emailbtn {
        width: calc(50% - 8px) !important;
        flex: 1 1 calc(50% - 8px) !important;
        max-width: calc(50% - 8px) !important;
    }
    #submit_form_paystubx_id .psx-paystub-toolbar .previewbtn,
    #submit_form_paystubx_id .psx-paystub-toolbar .emailbtn {
        width: auto !important;
        flex: 0 0 auto !important;
        max-width: none !important;
    }
}

/* PDF preview modal — fit mobile screens */
@media (max-width: 767px) {
    #tempViewModal .modal-dialog {
        margin: 0.5rem !important;
        max-width: calc(100% - 1rem) !important;
    }
    #tempViewModal #tempView {
        height: 70vh !important;
        min-height: 320px !important;
    }
}

/* ── Font Awesome icons inside buttons — normalize size ── */
.previewbtn .fa,
.emailbtn .fa {
    font-size: 20px !important;
    vertical-align: middle !important;
}
.add_button.earnbtn .fa,
.add_deduction.earnbtn .fa {
    font-size: 18px !important;
    vertical-align: middle !important;
}

/* ── Sub-label paragraphs (serif → system font, professional look) ── */
#submit_form_paystubx_id p[style*="font-family: serif"],
#submit_form_paystubx_id p[style*="font-family:serif"] {
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #5a6a7a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* ── Required asterisk ── */
.redColor { color: #c0392b !important; }

/* ── Template gallery modal opened from the eye icon ── */
.psx-template-dialog {
    width: min(96vw, 1500px) !important;
    max-width: min(96vw, 1500px) !important;
}
.usa-template-modal-content {
    border-radius: 20px !important;
    overflow: hidden;
    border: 1px solid #d8e1ea !important;
    box-shadow: 0 10px 36px rgba(15, 23, 42, 0.18) !important;
    min-height: 88vh;
}
.usa-template-modal-header {
    background: linear-gradient(135deg, #23384a, #1a2e3b) !important;
    border-bottom: none !important;
    padding: 14px 20px !important;
}
.usa-template-modal-header .close {
    color: #ffffff !important;
    opacity: 0.95 !important;
    text-shadow: none !important;
}
.usa-template-modal-body {
    padding: 22px 24px 24px !important;
    background: #ffffff !important;
    display: flex;
    flex-direction: column;
    min-height: calc(88vh - 64px);
}
.usa-template-modal-title {
    margin: 0 0 6px !important;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    color: #12263a !important;
    font-size: 1.22rem !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    letter-spacing: 0.01em !important;
}
.usa-template-modal-subtitle {
    margin: 0 0 16px !important;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    color: #5b6b7d !important;
    font-size: 0.93rem !important;
    font-weight: 600 !important;
}
.psx-template-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.psx-template-counter {
    background: #eef4f9;
    color: #173042;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.psx-template-viewer {
    display: flex;
    align-items: stretch;
    gap: 16px;
    flex: 1 1 auto;
    min-height: 0;
}
.psx-template-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 18px;
    flex: 1 1 auto;
    min-height: 0;
}
.psx-template-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}
.psx-template-peek-frame {
    border-radius: 12px;
    overflow: hidden;
    background: #f0f4f8;
    border: 1px solid #dde5ee;
    position: relative;
}
/* Main preview: full native size, user scrolls inside */
.psx-template-main-frame {
    border-radius: 14px;
    border: 1px solid #d5dfe8;
    background: #ffffff;
    box-shadow: 0 2px 16px rgba(15,23,42,0.08);
    overflow: auto;
    height: min(72vh, 860px);
    flex: 1 1 auto;
}
.psx-template-main-iframe {
    width: 100%;
    height: 1650px;
    border: none;
    display: block;
}
.psx-template-main-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 6px 0;
}
.psx-template-chip {
    display: inline-flex;
    align-items: center;
    background: #eef6fb;
    color: #1a6a8a;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.psx-template-main-copy {
    min-width: 0;
    flex: 1 1 auto;
}
.psx-template-title {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: 1.1rem;
    font-weight: 800;
    color: #12263a;
}
.psx-template-description {
    margin: 4px 0 0;
    color: #5b6b7d;
    font-size: 0.92rem;
    font-weight: 500;
}
.psx-template-apply {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #c62b0a, #d93b18);
    color: #fff;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(209,59,24,0.24);
    white-space: nowrap;
}
.psx-template-peek {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #d9e2eb;
    border-radius: 18px;
    background: #f8fbfd;
    padding: 14px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    min-height: 0;
}
.psx-template-peek:hover {
    transform: translateY(-2px);
    border-color: #b7c8d9;
    box-shadow: 0 10px 24px rgba(15,23,42,0.08);
}
.psx-template-peek.is-disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}
.psx-template-peek-label {
    color: #1a6a8a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.psx-template-peek-frame {
    height: 270px;
}
.psx-template-peek-iframe {
    width: 1200px;
    height: 1450px;
    transform: scale(0.22);
    transform-origin: top left;
    pointer-events: none;
    border: none;
    display: block;
}
.psx-template-peek-name {
    font-size: 13px;
    font-weight: 800;
    color: #173042;
    line-height: 1.35;
}
.psx-template-nav {
    width: 54px;
    min-width: 54px;
    border: 1px solid #d7e0e8;
    border-radius: 16px;
    background: #ffffff;
    color: #23384a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.psx-template-nav:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: #c3d1dd;
    box-shadow: 0 8px 20px rgba(15,23,42,0.08);
}
.psx-template-nav:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}
.psx-tpl-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 44px;
    color: #c0c8d8;
}
.psx-tpl-name {
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    background: #f8f9fb;
    border-top: 1px solid #e0e4ec;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

.usa-template-preview-empty {
    border: 1px dashed #c8d4de;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    color: #5a6a7a;
    background: #f8fafc;
    margin-top: 10px;
}

/* ── Responsive: tablet ── */
@media (max-width: 1023px) {
    .box-usa { padding: 16px 16px 20px !important; }
    .container.mt-2.px-0 { padding-left: 12px !important; padding-right: 12px !important; }
    .psx-template-dialog {
        width: 98vw !important;
        max-width: 98vw !important;
    }
    .psx-template-stage {
        grid-template-columns: minmax(0, 1fr) 200px;
    }
    .psx-template-main-frame {
        height: 60vh;
    }
    .psx-template-peek-frame {
        height: 220px;
    }
}

/* ── Responsive: mobile ── */
@media (max-width: 767px) {
    .box-usa { padding: 14px 12px 18px !important; border-radius: 10px !important; }
    .container.mt-2.px-0 { padding-left: 8px !important; padding-right: 8px !important; }
    .box-h5 { font-size: 0.9rem !important; }
    .statementbtn { font-size: 9.5px !important; padding: 7px 2px !important; letter-spacing: 0 !important; }
    .earnbtn { font-size: 12px !important; }
    .netpaybtn { font-size: 16px !important; }
    .createbtn { font-size: 14px !important; padding: 9px 18px !important; }
    .previewbtn, .emailbtn { font-size: 15px !important; padding: 11px 20px !important; }
    .hour_btn, .salary_btn {
        font-size: 12px !important;
        min-width: 96px !important;
        min-height: 40px !important;
        height: 40px !important;
        padding: 0 16px !important;
    }
    .usa-template-modal-content {
        min-height: 94vh;
        border-radius: 16px !important;
    }
    .usa-template-modal-body {
        padding: 16px !important;
        min-height: calc(94vh - 56px);
    }
    .psx-template-topbar {
        flex-direction: column;
        gap: 10px;
    }
    .psx-template-viewer {
        gap: 10px;
    }
    .psx-template-stage {
        grid-template-columns: 1fr;
    }
    .psx-template-main-frame {
        height: 52vh;
    }
    .psx-template-main-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .psx-template-peek {
        order: 2;
    }
    .psx-template-peek-frame {
        height: 180px;
    }
    .psx-template-nav {
        width: 44px;
        min-width: 44px;
        border-radius: 12px;
        font-size: 24px;
    }
}

@media (max-width: 479px) {
    .box-usa { padding: 12px 10px 14px !important; }
    .previewbtn, .emailbtn { width: 100% !important; }
}

/* ================================================================
   UK PAYSLIP GUIDE — 3-card layout
   ================================================================ */
.uk-payslip-guide {
    background: #f4f6fb;
}
.uk-payslip-guide .guide-section-label {
    display: inline-block;
    background: #e8eaf6;
    color: #1a237e;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}
.uk-payslip-guide .guide-main-heading {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #1a1f6c;
    font-family: helvetica-w01-bold, helvetica-w02-bold, sans-serif;
    margin-bottom: 0.75rem;
}
.uk-payslip-guide .guide-sub {
    color: #555;
    font-size: 1rem;
    max-width: 780px;
    margin: 0 auto;
    line-height: 1.75;
}
.guide-card {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(26, 31, 108, 0.10);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    display: flex;
    flex-direction: column;
}
.guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 36px rgba(26, 31, 108, 0.18);
}
.guide-card-header {
    background: linear-gradient(135deg, #1a1f6c 0%, #3949ab 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.guide-card-icon {
    font-size: 1.4rem;
    opacity: 0.9;
    flex-shrink: 0;
}
.guide-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
    font-family: 'Futura LT', sans-serif;
}
.guide-card-body {
    padding: 1.5rem;
    background: #fff;
    flex: 1;
}
.guide-badge {
    display: inline-block;
    background: #e8eaf6;
    color: #1a237e;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.guide-item {
    padding: 0.65rem 0;
    border-bottom: 1px solid #f0f2ff;
}
.guide-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.guide-item-title {
    font-weight: 700;
    color: #1a1f6c;
    font-size: 0.92rem;
    margin-bottom: 0.2rem;
}
.guide-item-desc {
    color: #555;
    font-size: 0.85rem;
    line-height: 1.65;
    margin: 0;
}

/* ================================================================
   GLOBAL PAGE — body feature cards (.global-feat-card)
   ================================================================ */
.global-feat-card {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(26, 31, 108, 0.09);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.global-feat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(26, 31, 108, 0.16);
}
.global-feat-card__header {
    background: linear-gradient(135deg, #0f2b6b 0%, #1976d2 100%);
    color: #fff;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.global-feat-card__icon {
    font-size: 1.3rem;
    opacity: 0.9;
    flex-shrink: 0;
}
.global-feat-card__header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    font-family: 'Futura LT', sans-serif;
}
.global-feat-card__body {
    padding: 1.25rem;
    background: #fff;
    flex: 1;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.7;
}
.global-feat-card__body p {
    margin: 0;
}
.global-feature-cards-heading {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 700;
    color: #0f2b6b;
    font-family: helvetica-w01-bold, helvetica-w02-bold, sans-serif;
}
/* Benefits section (reuses .guide-card styles already defined above) */
.global-benefits-section {
    background: #f4f6fb;
}

.global-showcase-section {
    background: #fafafa;
}

/* Equal-height columns: image card matches GLOBAL PAYROLL BENEFITS card */
.global-showcase-row > [class*="col-"] {
    display: flex;
}

.global-showcase-media-wrap {
    display: flex;
    flex: 1;
    min-height: 100%;
    justify-content: center;
    align-items: stretch;
}

.global-showcase-media-card {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: stretch;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(15, 43, 107, 0.14);
    background: #143461;
}

.global-showcase-media-card .global-mobile-img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 280px;
    margin-top: 0 !important;
    object-fit: cover;
    object-position: center 18%;
}

.global-showcase-copy-card {
    background: #fff;
    border-radius: 24px;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    box-shadow: 0 12px 34px rgba(15, 43, 107, 0.1);
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .global-showcase-copy-card {
        margin-left: 1rem;
    }
}

/* UK payslip guide — primary CTA: single line, modern sans-serif pill */
.uk-payslip-guide .uk-payslip-guide__cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 600;
    font-size: clamp(0.9rem, 2.2vw, 1.05rem);
    letter-spacing: 0.02em;
    padding: 0.65rem 1.85rem !important;
    border-radius: 999px !important;
    border: none;
    box-shadow: 0 4px 14px rgba(200, 35, 51, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.uk-payslip-guide .uk-payslip-guide__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(200, 35, 51, 0.45);
    color: #fff !important;
}
@media (max-width: 767px) {
    .ready-explore-section .col-md-1 {
        display: none;
    }
    .ready-explore-section .row {
        margin-left: 0;
        margin-right: 0;
    }
    .ready-explore-section .col-md-6.text-left.mb-5,
    .ready-explore-section .col-md-5.text-left.mb-5 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}
@media (max-width: 479px) {
    .uk-payslip-guide .uk-payslip-guide__cta {
        width: auto !important;
        max-width: calc(100vw - 2rem) !important;
        font-size: 0.82rem !important;
        padding: 0.55rem 1.1rem !important;
    }
}

/* ── Canada paystub — deduction cell: lock icon inside input (USA-style) ── */
.canada-deduction-cell {
    position: relative;
}
.canada-lock-icon {
    display: block;
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    font-size: 14px !important;
    color: #4e6680 !important;
    cursor: pointer !important;
    opacity: 0.72 !important;
    transition: opacity 0.18s, color 0.18s, transform 0.15s !important;
    line-height: 1 !important;
}
.canada-lock-icon:hover {
    opacity: 1 !important;
    color: #1a5276 !important;
    transform: translateY(-50%) scale(1.15) !important;
}
.canada-lock-icon.fa-unlock-alt {
    color: #1a7a55 !important;
    opacity: 0.85 !important;
}
/*
 * Reduce font size so long names like "CANADA SAVINGS PLAN" fit in the narrow
 * col-lg-4 cell — matching QuickBooks' approach of scaling text to the column
 * width rather than truncating. The title attribute provides the full name on hover.
 * Use ID prefix to match the specificity of #submit_form_paystubx_id .taxes above.
 */
#submit_form_paystubx_id .canada-tax-input {
    padding-left: 32px !important;
    text-align: left !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    line-height: 1.35 !important;
    min-height: 42px !important;
    box-sizing: border-box !important;
}
/* Manual add-deduction name — same typography as locked CPP/EI rows */
#submit_form_paystubx_id .canada-deduction-cell .other_taxes.canada-tax-input,
#submit_form_paystubx_id .addtaxes .other_taxes.canada-tax-input {
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-align: left !important;
}

/* Lock deduction row height to name cells so three columns stay aligned. */
#submit_form_paystubx_id .addtaxes_rate > .earnbtn.mt-3,
#submit_form_paystubx_id .addtaxes_ytd > .earnbtn.mt-3 {
    min-height: 42px !important;
    box-sizing: border-box !important;
}

/* Canada manual + statutory deduction rows — matched 3-column slots */
#submit_form_paystubx_id .addtaxes .canada-deduction-cell.mt-3,
#submit_form_paystubx_id .addtaxes_rate .canada-deduction-cell.mt-3,
#submit_form_paystubx_id .addtaxes_ytd .canada-deduction-cell.mt-3 {
    min-height: 42px !important;
    margin-top: 1rem !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}
#submit_form_paystubx_id .canada-deduction-cell.mt-3 > .earnbtn,
#submit_form_paystubx_id .canada-deduction-cell.mt-3 > input.earnbtn,
#submit_form_paystubx_id .canada-deduction-cell.mt-3 > select.ca-deduction-sel {
    width: 100% !important;
    min-height: 42px !important;
    height: 42px !important;
    margin-top: 0 !important;
    box-sizing: border-box !important;
}
#submit_form_paystubx_id .canada-deduction-cell .ca-deduction-sel {
    font-size: 11px !important;
    font-weight: 600 !important;
    text-align: left !important;
    padding-left: 8px !important;
    padding-right: 6px !important;
}
#submit_form_paystubx_id .canada-deduction-cell .ca-deduction-custom:not(.d-none) {
    min-height: 42px !important;
    height: 42px !important;
    margin-top: 0 !important;
}
#submit_form_paystubx_id .canada-deduction-cell .ca-deduction-sel.d-none + .ca-deduction-custom:not(.d-none) {
    display: block !important;
}
#submit_form_paystubx_id .psx-ca-manual-ded-ytd .psx-earn-field-wrap {
    width: 100% !important;
    margin: 0 !important;
}
#submit_form_paystubx_id .psx-ca-manual-ded-ytd .deduction_other_ytd {
    min-height: 42px !important;
    height: 42px !important;
}

/* ========== Legal docs & contact (static pages) ========== */
.legal-doc-page {
    background: linear-gradient(180deg, #0a0a0f 0%, #12121a 45%, #0d0d12 100%);
    color: #e8eaef;
    padding: 2rem 0 4rem;
    min-height: 55vh;
}
.legal-doc-page .legal-doc-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1rem;
}
.legal-doc-page .legal-hero {
    text-align: center;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 2rem;
}
.legal-doc-page .legal-hero h1 {
    font-size: clamp(1.65rem, 4vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
    color: #fff;
}
.legal-doc-page .legal-hero .lead {
    color: #a8b0c0;
    font-size: 1.02rem;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.65;
}
.legal-doc-page .legal-meta {
    font-size: 0.8125rem;
    color: #7a8599;
    margin-top: 0.85rem;
}
.legal-doc-page h2 {
    font-size: 1.22rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.65rem;
    color: #f0f2f6;
}
.legal-doc-page h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 1.35rem;
    margin-bottom: 0.5rem;
    color: #c8ceda;
}
.legal-doc-page p,
.legal-doc-page li {
    color: #b8c0d0;
    line-height: 1.72;
    font-size: 1rem;
}
.legal-doc-page ul,
.legal-doc-page ol {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}
.legal-doc-page li + li {
    margin-top: 0.35rem;
}
.legal-doc-page a {
    color: #7eb8ff;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.legal-doc-page a:hover {
    color: #b8d9ff;
}
.legal-doc-page .legal-note {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    margin: 1.25rem 0;
    font-size: 0.95rem;
}
.legal-doc-page .legal-seo-footnote {
    font-size: 0.78rem;
    color: #5a6578;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    line-height: 1.65;
}

/* Contact page styles live in resources/views/contact.blade.php (.psx-contact). */

/* ═══════════════════════════════════════════════════════════════════════
   PSX FORM — MOBILE RESPONSIVE FIXES  (USA · Canada · UK · Global)
   Covers iPhone 13/14 sizes and other narrow screens without changing
   desktop layout. These overrides load last on purpose.
   ═══════════════════════════════════════════════════════════════════════ */

/* Shared header row: keep the address icon + select readable. */
.box-usa .row.justify-content {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px 8px !important;
}

select.address_book,
select.address_book_1,
.address_book,
.address_book_1 {
    width: auto !important;
    min-width: 140px !important;
    max-width: calc(100% - 46px) !important;
    flex-shrink: 1 !important;
    box-sizing: border-box !important;
}

@media (max-width: 767px) {
    /* Template chooser: stack cards vertically so dropdown text fits. */
    #submit_form_paystubx_id .box-usa > .d-flex.justify-content-between.flex.w-100 {
        display: flex !important;
        flex-direction: column !important;
        gap: 18px !important;
        align-items: stretch !important;
    }
    #submit_form_paystubx_id .box-usa > .d-flex.justify-content-between.flex.w-100 > .sh {
        display: none !important;
    }
    #submit_form_paystubx_id .box-usa > .d-flex.justify-content-between.flex.w-100 > .margin-left,
    #submit_form_paystubx_id .box-usa > .d-flex.justify-content-between.flex.w-100 > .margin-right,
    #submit_form_paystubx_id .box-usa > .d-flex.justify-content-between.flex.w-100 > .col-md-5 {
        max-width: 100% !important;
        width: 100% !important;
        flex: 0 0 100% !important;
        margin-top: 0 !important;
        text-align: left !important;
    }
    #submit_form_paystubx_id .box-usa .mmenu {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
    }
    #submit_form_paystubx_id .box-usa .dropdown1 {
        width: 100% !important;
        flex: 1 1 auto !important;
        margin-right: 0 !important;
        padding: 8px 26px 8px 8px !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
        box-sizing: border-box !important;
    }
    #submit_form_paystubx_id .box-usa .direction-left,
    #submit_form_paystubx_id .box-usa .direction-left-canada,
    #submit_form_paystubx_id .box-usa .direction-left-canada-edit {
        padding-left: 8px !important;
        padding-right: 26px !important;
        font-size: 12px !important;
    }
    #submit_form_paystubx_id .box-usa .uk-eye {
        font-size: 26px !important;
        line-height: 1 !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }
    #submit_form_paystubx_id .box-usa h6[style*="margin-left"] {
        margin-left: 0 !important;
    }

    /* Worker type row: remove forced horizontal offset on phones. */
    .box-usa .d-flex.align-items-center[style*="margin-left"] {
        margin-left: 0 !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    /* USA deduction rows: only rows that actually contain the FA lock. */
    #submit_form_paystubx_id .box-usa .col-md-4.col-lg-3.mb-3:has(> .psx-lock-icon) {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    #submit_form_paystubx_id .box-usa .col-md-4.col-lg-3.mb-3:has(> .psx-lock-icon) > .psx-lock-icon {
        position: static !important;
        transform: none !important;
        margin-right: 6px !important;
        font-size: 16px !important;
        flex-shrink: 0 !important;
    }
    #submit_form_paystubx_id .box-usa .col-md-4.col-lg-3.mb-3:has(> .psx-lock-icon) > input.earnbtn {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        padding-left: 8px !important;
        text-align: left !important;
        box-sizing: border-box !important;
    }

    /* Global deduction rows: do the same for image locks, but do not
       override the hidden unlock image used by the toggle behavior. */
    #submit_form_paystubx_id .box-usa .col-md-4.col-lg-3.mb-3:has(> img.earnbtn2.lock) {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    #submit_form_paystubx_id .box-usa .col-md-4.col-lg-3.mb-3 > img.earnbtn2.lock {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 18px !important;
        height: 18px !important;
        margin-right: 6px !important;
        flex-shrink: 0 !important;
        object-fit: contain !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 2 !important;
    }
    #submit_form_paystubx_id .box-usa img.earnbtn2[style*="display:none"] {
        display: none !important;
    }
    #submit_form_paystubx_id .box-usa .col-md-4.col-lg-3.mb-3:has(> img.earnbtn2.lock) > input.earnbtn {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        padding-left: 8px !important;
        text-align: left !important;
        box-sizing: border-box !important;
    }

    /* Canada deduction cells already group lock + input together. */
    .canada-deduction-cell {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }
    .canada-deduction-cell > .canada-lock-icon,
    .canada-deduction-cell > .lock {
        position: static !important;
        transform: none !important;
        margin-right: 6px !important;
        font-size: 15px !important;
        flex-shrink: 0 !important;
    }
    .canada-deduction-cell > input.earnbtn {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        padding-left: 8px !important;
        text-align: left !important;
        box-sizing: border-box !important;
    }

    /* Hide empty spacer columns under deduction rows. */
    #submit_form_paystubx_id .box-usa .row > div[class*="col-"]:not([class*="mb-3"]):not(:has(*)) {
        display: none !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    #submit_form_paystubx_id .box-usa .col-md-2.col-lg-2.mb-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa .psx-summary-netpay-row > .col-md-2.col-lg-2.mb-3,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa .psx-summary-grid-row > .col-md-2.col-lg-2.mb-3 {
        flex: 0 0 auto !important;
        max-width: none !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* UK inputs: make sure they fill the row on mobile */
    #submit_form_paystubx_id .col-md-7.col-lg-7.mb-3 .input-uk {
        width: 100% !important;
        min-width: 0 !important;
        padding-left: 34px !important;
        text-align: left !important;
    }
    #submit_form_paystubx_id .col-md-7.col-lg-7.mb-3 > div > .input-uk,
    #submit_form_paystubx_id .col-md-5.col-lg-5.mb-3 > div > .input-uk,
    #submit_form_paystubx_id .col-md-7.col-lg-7.mb-3 > div > .netpaybtn {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* General safety net: no form element should overflow its card. */
    #submit_form_paystubx_id input,
    #submit_form_paystubx_id select,
    #submit_form_paystubx_id textarea {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* UK payment-method / tax-code / ni-table-letter selects:
       font-size ≥ 16px prevents iOS Safari auto-zoom on focus.
       height + padding ensure they look identical to .input-uk inputs. */
    #submit_form_paystubx_id select.input-uk {
        font-size: 16px !important;
        height: 44px !important;
        padding: 0 10px !important;
        width: 100% !important;
        border-radius: 4px !important;
        -webkit-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        padding-right: 32px !important;
    }
}

/* ── #setName "Set Up Account" modal — iOS webapp fix ─────────────────────
 * When the keyboard is open in WKWebView the visible area shrinks. The modal
 * card must not exceed the visible height, and the body must be scrollable so
 * the Cancel + Create Account buttons are always reachable by scrolling down.
 * This only applies to the region-page popup (app.blade.php path).
 * The standalone /login page renders #setName as a page section, not a modal,
 * and is unaffected by these rules.
 * ────────────────────────────────────────────────────────────────────────── */
html.psx-ios-webapp #setName .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 60px);
    overflow: hidden;
}
html.psx-ios-webapp #setName .axm-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
html.psx-ios-webapp #setName .axm-form-footer {
    display: flex !important;
    flex-shrink: 0;
    gap: 10px;
    margin-top: 16px;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   PSX PAYSTUB FORM — FULL MOBILE OVERHAUL  v3 (Jun 2026)
   Covers all 4 regions: USA · Canada · UK · Global.

   ROOT CAUSE of label clipping:
     .container.px-0 removes Bootstrap's 15px container padding, while
     .row still applies its -15px negative margins — pushing content
     15 px off-screen on the left. Fix: restore 12px side padding on
     the container at mobile widths and zero out row gutters inside
     the form.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Global: no horizontal page scroll on any screen ─────────────────── */
/* Note: only body gets overflow-x:hidden — setting it on html too creates
   an iOS scrolling-context bug that shifts the viewport and clips the footer. */
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ── Tablet + phone (≤ 991px): tighten up the container ─────────────── */
@media (max-width: 991px) {
    /* Re-add side padding the px-0 utility stripped off */
    .container.px-0,
    .container.mt-2.px-0 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* ── Phone (≤ 767px): full responsive overhaul ───────────────────────── */
@media (max-width: 767px) {

    /* 1. Container: tighter padding on small phones */
    .container.px-0,
    .container.mt-2.px-0 {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* 2. ALL rows inside the form: cancel negative Bootstrap margins that cause
          overflow now that the container has padding. Covers mb-3, mt-5, my-3,
          bare rows, and nested rows alike. */
    #submit_form_paystubx_id .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* 3. Cols: symmetric gutter */
    #submit_form_paystubx_id .row > [class*="col-"] {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    /* 4. box-usa card: proper horizontal breathing room + visual polish */
    .box-usa {
        padding: 14px 10px 16px !important;
        border-width: 2px !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        margin-bottom: 14px !important;
    }

    /* 5. All md-only columns go full-width on phones */
    #submit_form_paystubx_id .col-md-6,
    #submit_form_paystubx_id .col-md-4,
    #submit_form_paystubx_id .col-md-3,
    #submit_form_paystubx_id .col-md-7,
    #submit_form_paystubx_id .col-md-5,
    #submit_form_paystubx_id .col-md-8,
    #submit_form_paystubx_id .col-md-9,
    #submit_form_paystubx_id .col-md-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* 6. Inputs / selects / textareas: full width, minimum 44px tap target.
          font-size MUST be 16px on iOS — anything below 16px triggers
          auto-zoom on focus which shifts the viewport and clips the footer.
          Checkboxes/radios must stay compact — never stretch to full row width. */
    #submit_form_paystubx_id input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
    #submit_form_paystubx_id select,
    #submit_form_paystubx_id textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        min-height: 44px !important;
        font-size: 16px !important;
        border-radius: 4px !important;
    }

    #submit_form_paystubx_id input[type="checkbox"],
    #submit_form_paystubx_id input[type="radio"] {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        max-width: 18px !important;
        min-height: 18px !important;
        margin: 0 !important;
        padding: 0 !important;
        flex: 0 0 18px !important;
        box-sizing: border-box !important;
        border-radius: 3px !important;
        accent-color: #0b2f5b;
        vertical-align: middle;
        appearance: auto !important;
        -webkit-appearance: auto !important;
    }

    #submit_form_paystubx_id input[type="checkbox"] {
        -webkit-appearance: checkbox !important;
        appearance: checkbox !important;
    }

    #submit_form_paystubx_id input[type="radio"] {
        border-radius: 50% !important;
        -webkit-appearance: radio !important;
        appearance: radio !important;
    }

    #submit_form_paystubx_id .psx-usa-show-on-template-toggle,
    #submit_form_paystubx_id label.psx-usa-show-on-template-toggle {
        display: flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 10px !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        line-height: 1.4 !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        color: #334155 !important;
        white-space: normal !important;
        cursor: pointer !important;
    }

    #submit_form_paystubx_id .psx-usa-show-on-template-toggle input[type="checkbox"] {
        margin-top: 2px !important;
    }

    #submit_form_paystubx_id .form-check {
        display: flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
        margin-top: 10px !important;
        padding-left: 0 !important;
        min-height: 0 !important;
    }

    #submit_form_paystubx_id .form-check-input {
        float: none !important;
        margin-left: 0 !important;
        margin-top: 2px !important;
        position: static !important;
    }

    #submit_form_paystubx_id .form-check-label,
    #submit_form_paystubx_id .form-check .lable {
        display: inline !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        max-width: none !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        white-space: normal !important;
        line-height: 1.35 !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        color: #334155 !important;
    }

    #submit_form_paystubx_id .psx-usa-show-on-template-toggle + .text-muted,
    #submit_form_paystubx_id .form-check + .text-muted,
    #submit_form_paystubx_id select + .text-muted,
    #submit_form_paystubx_id input + .text-muted,
    #submit_form_paystubx_id .text-muted.d-block,
    #submit_form_paystubx_id small.text-muted {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 6px !important;
        margin-bottom: 0 !important;
        line-height: 1.4 !important;
        white-space: normal !important;
    }

    /* Vertical rhythm for stacked mobile fields */
    #submit_form_paystubx_id .row > [class*="col-"].mt-4,
    #submit_form_paystubx_id .row > [class*="col-"].mt-3 {
        margin-top: 14px !important;
        margin-bottom: 0 !important;
    }

    #submit_form_paystubx_id .psx-usa-more-options-toggle {
        width: 100% !important;
        min-height: 48px !important;
        margin-top: 4px !important;
    }

    #submit_form_paystubx_id .psx-ca-pay-type-toggle {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
    }

    #submit_form_paystubx_id .psx-ca-pay-type-toggle .hour_btn,
    #submit_form_paystubx_id .psx-ca-pay-type-toggle .salary_btn {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        min-height: 44px !important;
        height: 44px !important;
        margin: 0 !important;
        padding: 0 12px !important;
    }

    /* Pay period / payday: full-width stacked rows on phones */
    #submit_form_paystubx_id #pay_start,
    #submit_form_paystubx_id #pay_end,
    #submit_form_paystubx_id #pay_date {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 7. Labels: uppercase already set; improve readability */
    #submit_form_paystubx_id .lable {
        font-size: 11px !important;
        font-weight: 700 !important;
        letter-spacing: 0.04em !important;
        margin-bottom: 5px !important;
        display: block !important;
        line-height: 1.3 !important;
    }

    /* 8. Section header */
    #submit_form_paystubx_id .box-h5,
    #submit_form_paystubx_id h5.box-h5 {
        font-size: 14px !important;
        font-weight: 700 !important;
        margin: 0 4px 4px !important;
        letter-spacing: 0.02em !important;
    }

    /* 9. Address-book header row (Company Info / Employee Info) —
          fix position:relative + left:10px inline styles */
    .address-book {
        position: static !important;
        left: 0 !important;
        right: 0 !important;
        height: 34px !important;
        width: 34px !important;
        flex-shrink: 0 !important;
        margin-right: 8px !important;
    }
    select.address_book,
    .address_book {
        position: static !important;
        left: 0 !important;
        width: auto !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: calc(100% - 46px) !important;
        height: 34px !important;
        min-height: 34px !important;
        font-size: 13px !important;
        padding: 0 8px !important;
        box-sizing: border-box !important;
        border-radius: 4px !important;
    }
    select.address_book_1,
    .address_book_1 {
        position: static !important;
        left: 0 !important;
        width: auto !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: calc(100% - 46px) !important;
        height: 34px !important;
        min-height: 34px !important;
        font-size: 13px !important;
        padding: 0 8px !important;
        box-sizing: border-box !important;
        border-radius: 4px !important;
    }

    /* 10. USA state dropdown */
    #submit_form_paystubx_id .state,
    #submit_form_paystubx_id select.state,
    #submit_form_paystubx_id .dropdown11,
    #submit_form_paystubx_id select.dropdown11 {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        min-height: 44px !important;
        font-size: 14px !important;
    }

    /* 11. Earnings rows: Rate + Hours stay 50/50 for compact entry.
          Exclude Net Pay / Taxes summary amount cols — those use a 1fr|1fr grid. */
    #submit_form_paystubx_id .col-md-2.col-lg-2.mb-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row > .col-md-2.col-lg-2.mb-3,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) > .col-md-2.col-lg-2.mb-3 {
        flex: 0 0 auto !important;
        max-width: none !important;
        width: 100% !important;
    }

    /* 12. Net pay / Total / YTD summary cols stay 50/50 */
    #submit_form_paystubx_id .col-md-2.mb-2 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }

    /* 13. Net Pay / Taxes label buttons */
    #submit_form_paystubx_id .netpaybtn,
    #submit_form_paystubx_id .net_pay {
        width: 100% !important;
        min-height: 40px !important;
        font-size: 13px !important;
        box-sizing: border-box !important;
        white-space: normal !important;
    }

    /* 14. Submit row buttons: stack vertically on mobile, side-by-side on tablet+.
          Icons stay INLINE with label text (never stacked inside the button).
          Toolbar variant keeps content height (no space-between stretch). */
    #submit_form_paystubx_id .psx-paystub-actions,
    #submit_form_paystubx_id .usa-btn-inner,
    #submit_form_paystubx_id .canada-btn-inner {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    #submit_form_paystubx_id .psx-paystub-actions.psx-paystub-toolbar,
    #submit_form_paystubx_id .usa-btn-inner.psx-paystub-toolbar,
    #submit_form_paystubx_id .canada-btn-inner.psx-paystub-toolbar {
        justify-content: flex-start !important;
        align-items: stretch !important;
        gap: 16px !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 14px 12px !important;
        flex-grow: 0 !important;
    }
    #submit_form_paystubx_id .psx-paystub-toolbar .psx-paystub-toolbar__status,
    #submit_form_paystubx_id .psx-paystub-toolbar .psx-paystub-toolbar__actions {
        flex: 0 0 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
    }
    #submit_form_paystubx_id .psx-paystub-toolbar .psx-paystub-toolbar__actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    #submit_form_paystubx_id .psx-paystub-toolbar .psx-paystub-toolbar__split {
        display: flex !important;
        width: 100% !important;
    }
    #submit_form_paystubx_id .psx-paystub-toolbar .emailbtn,
    #submit_form_paystubx_id .psx-paystub-toolbar .psx-paystub-toolbar__btn--primary {
        width: auto !important;
        flex: 1 1 auto !important;
        max-width: none !important;
    }
    #submit_form_paystubx_id .psx-paystub-toolbar .psx-paystub-toolbar__btn--primary-caret {
        flex: 0 0 48px !important;
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
    }
    #submit_form_paystubx_id.psx-paystub-form--canada .psx-paystub-actions,
    #submit_form_paystubx_id.psx-paystub-form--canada .usa-btn-inner,
    #submit_form_paystubx_id.psx-paystub-form--uk .psx-paystub-actions,
    #submit_form_paystubx_id.psx-paystub-form--uk .canada-btn-inner,
    #submit_form_paystubx_id.psx-paystub-form--uk .uk-bottom-btn,
    #submit_form_paystubx_id.psx-paystub-form--global .psx-global-btn-bar,
    #submit_form_paystubx_id.psx-paystub-form--global .psx-paystub-actions {
        padding-bottom: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }
    #submit_form_paystubx_id .psx-paystub-actions .previewbtn,
    #submit_form_paystubx_id .psx-paystub-actions .emailbtn,
    #submit_form_paystubx_id .psx-paystub-actions .sendMailButton,
    #submit_form_paystubx_id .usa-btn-inner .previewbtn,
    #submit_form_paystubx_id .usa-btn-inner .emailbtn,
    #submit_form_paystubx_id .canada-btn-inner .previewbtn,
    #submit_form_paystubx_id .canada-btn-inner .emailbtn {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
        text-align: center !important;
        margin: 0 !important;
        min-height: 52px !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        line-height: 1.2 !important;
        box-sizing: border-box !important;
        white-space: normal !important;
    }
    /* Toolbar split Generate: undo width:100% on primary so caret stays ~48px */
    #submit_form_paystubx_id .psx-paystub-toolbar.psx-paystub-actions .emailbtn,
    #submit_form_paystubx_id .psx-paystub-toolbar.usa-btn-inner .emailbtn,
    #submit_form_paystubx_id .psx-paystub-toolbar .psx-paystub-toolbar__btn--primary {
        width: auto !important;
        flex: 1 1 auto !important;
        max-width: none !important;
        border-radius: 10px 0 0 10px !important;
    }
    #submit_form_paystubx_id .psx-paystub-toolbar .psx-paystub-toolbar__btn--primary-caret {
        flex: 0 0 48px !important;
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
        border-radius: 0 10px 10px 0 !important;
    }
    /* Legacy w-sm-100 on buttons: width only — do NOT flex-column the button itself */
    #submit_form_paystubx_id button.w-sm-100 {
        width: 100% !important;
        flex-direction: row !important;
    }
    /* Icons inside the action buttons: size them consistently */
    #submit_form_paystubx_id .previewbtn .fa,
    #submit_form_paystubx_id .sendMailButton .fa,
    #submit_form_paystubx_id .emailbtn .fa {
        font-size: 20px !important;
        line-height: 1 !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }

    /* 15. Canada wrapper: no extra horizontal padding on mobile */
    .canada-padding,
    div.canada-padding {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* 16. UK pay section */
    #submit_form_paystubx_id .pay-outer,
    #submit_form_paystubx_id .uk-bottom-btn {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    #submit_form_paystubx_id .ukpay-inner {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 8px !important;
    }

    /* 17. Empty spacer columns take no space */
    #submit_form_paystubx_id .col-md-1:not(:has(*)),
    #submit_form_paystubx_id .col-md-2:not(:has(*)):not(.mb-2):not(.mb-3) {
        display: none !important;
        padding: 0 !important;
        margin: 0 !important;
        height: 0 !important;
    }

    /* 18. earnbtn inputs (deduction cells): full-width */
    #submit_form_paystubx_id input.earnbtn,
    #submit_form_paystubx_id select.uk-earning-sel {
        width: 100% !important;
        min-height: 42px !important;
        font-size: 14px !important;
        box-sizing: border-box !important;
    }

    /* 19. Prevent any inline max-width or width on form wrapper from
          shrinking the form vertically (keyboard-open bug) */
    #submit_form_paystubx_id {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* 20. Keep half-width only for true pair rows using mt-1.
          Pay Period Start/End/Payday use mt-4 and must stay full-width stacked. */
    #submit_form_paystubx_id .col-md-3.mt-1,
    #submit_form_paystubx_id .col-md-4.mt-1 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }

    #submit_form_paystubx_id .col-md-3.mt-4,
    #submit_form_paystubx_id .col-md-4.mt-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* ── Very small phones (≤ 374px): iPhone SE size ─────────────────────── */
@media (max-width: 374px) {
    .container.px-0,
    .container.mt-2.px-0 {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
    /* Keep font-size at 16px even on very small phones — below 16px triggers
       iOS auto-zoom which shifts the entire viewport. */
    #submit_form_paystubx_id input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
    #submit_form_paystubx_id select {
        font-size: 16px !important;
        min-height: 42px !important;
    }
    #submit_form_paystubx_id input[type="checkbox"],
    #submit_form_paystubx_id input[type="radio"] {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        max-width: 18px !important;
        min-height: 18px !important;
    }
    #submit_form_paystubx_id .lable {
        font-size: 10px !important;
        letter-spacing: 0.02em !important;
    }
    #submit_form_paystubx_id .col-md-2.col-lg-2.mb-3,
    #submit_form_paystubx_id .col-md-2.mb-2 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* ── Landscape phone (≤ 767px, landscape): two-column for pairs ──────── */
@media (max-width: 767px) and (orientation: landscape) {
    #submit_form_paystubx_id .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
    /* Keep earnings rows 50/50 in landscape too */
    #submit_form_paystubx_id .col-md-2.col-lg-2.mb-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
}

/* ── Keyboard-aware: when iOS keyboard is open the visual viewport shrinks.
      Ensure the main content area scrolls normally and is not clipped. ── */
@supports (height: 100dvh) {
    @media (max-width: 767px) {
        #submit_form_paystubx_id {
            /* Nothing fixed inside the form; let the page scroll naturally */
            position: static !important;
        }
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   PSX QA PATCH v3.1 — Gap fixes found in full audit (Jun 2026)
   Targets inline styles that override the v3 overhaul on mobile.
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {

    /* ── Fix 1: Worker-type select (USA / Global)
          Inline style="margin-left:60px" pushes it off-screen on phones. */
    #submit_form_paystubx_id .d-flex.align-items-center[style*="margin-left"] {
        margin-left: 0 !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        width: 100% !important;
    }

    /* ── Fix 2: #emp_type select — inline width:155px
          Needs full-width tap target on mobile. */
    #submit_form_paystubx_id #emp_type,
    #submit_form_paystubx_id select#emp_type {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 44px !important;
        font-size: 14px !important;
        box-sizing: border-box !important;
    }

    /* ── Fix 3: UK note column padding-bottom:255px
          255px of blank space below a text field makes no sense on mobile. */
    #submit_form_paystubx_id [style*="padding-bottom:255px"],
    #submit_form_paystubx_id [style*="padding-bottom: 255px"] {
        padding-bottom: 12px !important;
    }

    /* ── Fix 4: UK Payments pay-outer padding-bottom:62px
          Trim excess vertical space in Payments section. */
    #submit_form_paystubx_id .pay-outer[style*="padding-bottom:62px"],
    #submit_form_paystubx_id .pay-outer[style*="padding-bottom: 62px"] {
        padding-bottom: 10px !important;
    }

    /* ── Fix 5: col-lg-* only columns (UK/Canada headings + UK earning cols)
          These don't respond to col-md-* rules — force full width here. */
    #submit_form_paystubx_id .col-lg-5,
    #submit_form_paystubx_id .col-lg-7,
    #submit_form_paystubx_id .col-lg-8,
    #submit_form_paystubx_id .col-lg-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    /* col-lg-4 used as spacer in UK — suppress on mobile */
    #submit_form_paystubx_id .col-lg-4:not([class*="col-md"]) {
        display: none !important;
        padding: 0 !important;
        margin: 0 !important;
        height: 0 !important;
    }

    /* ── Fix 6: UK section headings (col-lg-5 / col-lg-7) —
          Reduce the 30px font to readable mobile size. */
    #submit_form_paystubx_id .col-lg-5[style*="font-size:30px"],
    #submit_form_paystubx_id .col-lg-5[style*="font-size: 30px"],
    #submit_form_paystubx_id .col-lg-7[style*="font-size:30px"],
    #submit_form_paystubx_id .col-lg-7[style*="font-size: 30px"] {
        font-size: 16px !important;
        font-weight: 700 !important;
        padding: 6px 4px !important;
        margin-bottom: 8px !important;
    }

    /* ── Fix 7: UK col-lg-8 earning fields (no col-md-* counterpart) —
          Remove pl-0 / p-0 inline overrides that pin to left edge. */
    #submit_form_paystubx_id .col-lg-8 {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    /* ── Fix 8: Canada col-lg-7 / col-lg-5 / col-lg-12 earning cols */
    #submit_form_paystubx_id .col-lg-7,
    #submit_form_paystubx_id .col-lg-5 {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    /* ── Fix 9: Rows with px-3 / p-3 that aren't offset by row margins —
          They add extra horizontal padding inside already-padded box-usa. */
    #submit_form_paystubx_id .row.p-3,
    #submit_form_paystubx_id .row.px-3 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* ── Fix 10: Canada earning center-btn col (col-lg-12) —
          Ensure it fills width and buttons align on mobile. */
    #submit_form_paystubx_id .col-lg-12.center-btn {
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* ── Fix 11: canada-btn-inner / usa-btn-inner flex wrapper —
          Stack Preview + Email buttons vertically on phones. */
    #submit_form_paystubx_id .canada-btn-inner,
    #submit_form_paystubx_id .usa-btn-inner {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: stretch !important;
        width: 100% !important;
    }

    /* ── Fix 12: Stub No / reference row — keep layout from breaking */
    #submit_form_paystubx_id .d-flex.justify-content-between.align-items-center[style*="position:relative"] {
        position: static !important;
        bottom: auto !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    /* ── Fix 13: mt-5 top-margin rows inside .box-usa —
          mt-5 = 3rem = 48px; too much vertical space on phones. */
    #submit_form_paystubx_id .box-usa .row.mt-5 {
        margin-top: 16px !important;
    }

    /* ── Fix 14: UK earn/pay sections — ukpay-inner width safety net */
    #submit_form_paystubx_id .pay-outer {
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    /* ── Fix 15: All inline margin-left / margin-right on non-label divs
          inside the form — prevent any stray offset from overflowing. */
    #submit_form_paystubx_id .box-usa [style*="margin-left:"][style*="px"] {
        margin-left: 0 !important;
    }
    #submit_form_paystubx_id .box-usa [style*="margin-right:"][style*="px"] {
        margin-right: 0 !important;
    }

}

/* Signup modal (.axm-hp-field / field errors) — psx-auth-modals.css */


/* ── Site-wide email verification banner ──────────────────────────────── */
@keyframes psx-banner-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0), inset 0 1px 0 rgba(255,255,255,0.32); }
    50%       { box-shadow: 0 0 0 6px rgba(239,68,68,0.30), inset 0 1px 0 rgba(255,255,255,0.42); }
}
@keyframes psx-dot-ping {
    0%   { transform: scale(1); opacity: 1; }
    75%  { transform: scale(1.9); opacity: 0; }
    100% { transform: scale(1.9); opacity: 0; }
}
@keyframes psx-icon-bounce {
    0%, 100% { transform: translateY(0);    }
    40%       { transform: translateY(-4px); }
    60%       { transform: translateY(-2px); }
}

#psx-verify-banner {
    animation: psx-banner-pulse 2.6s ease-in-out infinite;
}
#psx-verify-banner .psx-banner-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 18px;
    animation: psx-icon-bounce 2.4s ease-in-out infinite;
}
#psx-verify-banner .psx-banner-dot {
    position: absolute;
    top: -3px;
    right: -4px;
    width: 9px;
    height: 9px;
    background: #fde047;
    border-radius: 50%;
}
#psx-verify-banner .psx-banner-dot::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #fde047;
    animation: psx-dot-ping 1.4s cubic-bezier(0,0,.2,1) infinite;
}
#psx-verify-banner .psx-banner-btn {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.72);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 6px 16px rgba(69,10,10,0.22);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s, border-color 0.18s;
}
#psx-verify-banner .psx-banner-btn:hover {
    background: rgba(255,255,255,0.32);
    border-color: #fff;
    color: #fff;
    text-decoration: none;
}
#psx-verify-banner .psx-banner-dismiss {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.65);
    font-size: 17px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.15s;
}
#psx-verify-banner .psx-banner-dismiss:hover {
    color: #fff;
}

/* ── Profile page: unverified email badge + Verify Email CTA ─────────────── */
.psx-email-verify-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.psx-email-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    line-height: 1.3;
}

.psx-email-status-badge--verified {
    color: #16a34a;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

.psx-email-status-badge--unverified {
    color: #92400e;
    border: 1.5px solid #f59e0b;
    transform-origin: center;
    animation:
        psx-unverified-heartbeat 1.35s ease-in-out infinite,
        psx-unverified-bg-shift 2.8s ease-in-out infinite;
}

@keyframes psx-unverified-heartbeat {
    0%, 100% { transform: scale(1); }
    12%      { transform: scale(1.1); }
    24%      { transform: scale(1); }
    36%      { transform: scale(1.06); }
    48%      { transform: scale(1); }
}

@keyframes psx-unverified-bg-shift {
    0%, 100% {
        background: #fef3c7;
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45);
    }
    33% {
        background: #fde68a;
        box-shadow: 0 0 14px 3px rgba(245, 158, 11, 0.38);
    }
    66% {
        background: #fed7aa;
        box-shadow: 0 0 10px 2px rgba(234, 88, 12, 0.32);
    }
}

.psx-verify-email-cta {
    display: inline-block;
    font-size: 15px;
    font-weight: 800;
    color: #dc2626;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    letter-spacing: 0.01em;
    animation: psx-verify-cta-glow 2.2s ease-in-out infinite;
    transition: color 0.15s ease;
}

.psx-verify-email-cta:hover {
    color: #b91c1c;
    text-decoration: underline;
}

@keyframes psx-verify-cta-glow {
    0%, 100% { opacity: 1; text-shadow: none; }
    50%      { opacity: 1; text-shadow: 0 0 8px rgba(220, 38, 38, 0.35); }
}

@media (max-width: 480px) {
    .psx-verify-email-cta {
        font-size: 14px;
    }
    .psx-email-status-badge--unverified {
        font-size: 11px;
    }
}

/* ══ Paystub summary labels + UK borders — final override (Jun 2026 QA) ══ */
#submit_form_paystubx_id button.netpaybtn,
#submit_form_paystubx_id .netpaybtn,
#submit_form_paystubx_id button.createbtn,
#submit_form_paystubx_id .createbtn {
    background: #021891 !important;
    background-image: none !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

#submit_form_paystubx_id button.statementbtn,
#submit_form_paystubx_id .statementbtn {
    background: linear-gradient(180deg, #253d4e, #1a2e3b) !important;
    color: #ffffff !important;
}

#submit_form_paystubx_id .pay-outer,
#submit_form_paystubx_id .box-usa {
    border-color: #C0C0C0 !important;
}

#submit_form_paystubx_id .input-uk,
#submit_form_paystubx_id select.input-uk {
    border: 1.5px solid #C0C0C0 !important;
}

/* ── USA Advanced template grouped dropdown ── */
.psx-adv-picker-shell {
    text-align: left;
    max-width: 520px;
    margin: 0 auto;
}
.psx-adv-picker-shell--usa {
    max-width: 680px;
}
.psx-adv-template-control {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}
.psx-adv-dropdown {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}
.psx-adv-native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.psx-adv-dropdown__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 11px 14px 11px 16px;
    border: 1.5px solid #d0d9e3;
    border-radius: 10px;
    background: #ffffff;
    color: #173042;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.psx-adv-dropdown__trigger:hover {
    border-color: #b7c8d9;
    background: #fbfdff;
}
.psx-adv-dropdown.is-open .psx-adv-dropdown__trigger,
.psx-adv-dropdown__trigger:focus {
    outline: none;
    border-color: #1a6a8a;
    box-shadow: 0 0 0 3px rgba(26, 106, 138, 0.12);
}
.psx-adv-dropdown__label {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.psx-adv-dropdown__label.is-placeholder {
    color: #64748b;
    font-weight: 500;
}
.psx-adv-dropdown__chevron {
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' fill='%235a6a7a' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.18s ease;
}
.psx-adv-dropdown.is-open .psx-adv-dropdown__chevron {
    transform: rotate(180deg);
}
.psx-adv-dropdown__menu {
    position: absolute;
    z-index: 1200;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: min(52vh, 420px);
    overflow: auto;
    padding: 8px;
    border: 1px solid #d5dfe8;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}
.psx-adv-dropdown__group + .psx-adv-dropdown__group {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e8eef3;
}
.psx-adv-dropdown__group-head {
    margin-bottom: 6px;
    padding: 0 6px;
    text-align: left;
}
.psx-adv-dropdown__group-label {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #173042 !important;
}
.psx-adv-dropdown__group-desc {
    margin: 3px 0 0;
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.35;
    text-align: left;
}
.psx-adv-dropdown__options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.psx-adv-dropdown__option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #173042;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    transition: background 0.14s ease, border-color 0.14s ease;
}
.psx-adv-dropdown__option:hover {
    background: #f3f8fb;
    border-color: #e2ebf2;
}
.psx-adv-dropdown__option.is-selected {
    background: #eef6fb;
    border-color: #c7deea;
}
.psx-adv-dropdown__swatch {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--psx-accent, #64748b);
    border: 1px solid rgba(15, 23, 42, 0.12);
}
.psx-adv-dropdown__option-text {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}
.psx-adv-preview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 46px;
    padding: 0 16px;
    border: 1.5px solid #cfd8e3;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
    color: #173042;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.14s ease, color 0.18s ease;
}
.psx-adv-preview-btn .fa-eye {
    font-size: 1rem;
    color: #1a6a8a;
    transition: color 0.18s ease;
}
.psx-adv-preview-btn:hover {
    border-color: #1a6a8a;
    color: #0f2433;
    box-shadow: 0 8px 18px rgba(26, 106, 138, 0.12);
    transform: translateY(-1px);
}
.psx-adv-preview-btn:hover .fa-eye {
    color: #d32f0c;
}
.psx-adv-preview-btn:focus {
    outline: none;
    border-color: #1a6a8a;
    box-shadow: 0 0 0 3px rgba(26, 106, 138, 0.12);
}
@media (max-width: 767px) {
    .psx-adv-picker-shell {
        max-width: 100%;
    }
    .psx-adv-template-control {
        flex-direction: column;
        align-items: stretch;
    }
    .psx-adv-preview-btn {
        width: 100%;
        min-height: 42px;
    }
    .psx-adv-dropdown__menu {
        max-height: min(60vh, 360px);
    }
}

/* ═══════════════════════════════════════════════════════
   Marketing pages — Templates & App
═══════════════════════════════════════════════════════ */
.px-marketing-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 64px;
}
.px-marketing-hero {
    text-align: center;
    padding: 48px 0 36px;
}
.px-marketing-hero__inner {
    max-width: 760px;
    margin: 0 auto;
}
.px-marketing-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1e4976;
    background: rgba(30, 73, 118, 0.08);
    border: 1px solid rgba(30, 73, 118, 0.15);
    border-radius: 999px;
    padding: 6px 14px;
    margin-bottom: 16px;
}
.px-marketing-hero__title {
    font-size: clamp(1.85rem, 4vw, 2.6rem);
    font-weight: 700;
    color: #0f172a;
    line-height: 1.15;
    margin: 0 0 14px;
}
.px-marketing-hero__sub {
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    color: #475569;
    line-height: 1.65;
    margin: 0 auto 24px;
    max-width: 680px;
}
.px-marketing-hero__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.px-marketing-cta {
    border-radius: 8px;
    font-weight: 600;
    padding: 12px 28px;
}

/* ── Templates page: hero & SEO sections ── */
.px-tpl-hero {
    text-align: center;
    padding: 44px 0 32px;
    max-width: 860px;
    margin: 0 auto;
}
.px-tpl-hero__title {
    font-size: clamp(1.9rem, 4.5vw, 2.75rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.12;
    margin: 0 0 14px;
}
.px-tpl-hero__lead {
    font-size: clamp(1rem, 2.2vw, 1.18rem);
    color: #475569;
    line-height: 1.65;
    margin: 0 auto 20px;
    max-width: 720px;
}
.px-tpl-hero__bullets {
    list-style: none;
    margin: 0 auto 26px;
    padding: 0;
    max-width: 680px;
    text-align: left;
}
.px-tpl-hero__bullets li {
    position: relative;
    padding: 0 0 10px 28px;
    color: #334155;
    font-size: 0.96rem;
    line-height: 1.55;
}
.px-tpl-hero__bullets li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: #15803d;
    font-weight: 700;
}
.px-tpl-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.px-tpl-hero__ghost {
    border-radius: 8px;
    font-weight: 600;
    padding: 12px 24px;
    color: #1e4976;
    border-color: #1e4976;
}
.px-tpl-hero__ghost:hover {
    background: rgba(30, 73, 118, 0.06);
    color: #1e4976;
}
.px-tpl-value-strip {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px 24px;
    margin-bottom: 32px;
    text-align: center;
}
.px-tpl-value-strip__title {
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px;
}
.px-tpl-value-strip__text {
    margin: 0 auto;
    max-width: 720px;
    color: #64748b;
    line-height: 1.6;
    font-size: 0.98rem;
}
.px-tpl-gallery-shell {
    scroll-margin-top: 96px;
}
.px-tpl-toolbar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.px-tpl-toolbar__search {
    width: 100%;
}
.px-tpl-search-input {
    width: 100%;
    max-width: 420px;
    display: block;
    margin: 0 auto;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #0f172a;
    background: #fff;
}
.px-tpl-search-input:focus {
    outline: none;
    border-color: #1e4976;
    box-shadow: 0 0 0 3px rgba(30, 73, 118, 0.12);
}
.px-tpl-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.px-tpl-parent-filter,
.px-tpl-layout-filter {
    appearance: none;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.px-tpl-parent-filter:hover,
.px-tpl-layout-filter:hover {
    border-color: #1e4976;
    color: #1e4976;
}
.px-tpl-parent-filter.is-active,
.px-tpl-layout-filter.is-active {
    background: #1e4976;
    border-color: #1e4976;
    color: #fff;
}
.px-tpl-parent-group,
.px-tpl-layout-group {
    margin-bottom: 36px;
}
.px-tpl-parent-group[hidden],
.px-tpl-layout-group[hidden] {
    display: none !important;
}
.px-tpl-parent-group__head,
.px-tpl-layout-group__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}
.px-tpl-parent-group__title,
.px-tpl-layout-group__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.px-tpl-parent-group__count,
.px-tpl-layout-group__count {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}
.px-template-card[hidden] {
    display: none !important;
}
.px-template-card__desc {
    margin: 0 0 14px;
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.5;
    flex: 1;
}
.px-tpl-empty {
    text-align: center;
    color: #64748b;
    font-weight: 600;
    padding: 24px 12px;
}
.px-tpl-empty--hidden[hidden] {
    display: none !important;
}
.px-tpl-why {
    margin-top: 48px;
    padding-top: 12px;
    text-align: center;
}
.px-tpl-why__title {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
}
.px-tpl-why__sub {
    margin: 0 auto 28px;
    max-width: 640px;
    color: #64748b;
    line-height: 1.6;
}
.px-tpl-why__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    text-align: left;
}
.px-tpl-why-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 18px;
}
.px-tpl-why-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}
.px-tpl-why-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.55;
}
.px-tpl-faq {
    margin-top: 48px;
}
.px-tpl-faq__title {
    font-size: clamp(1.25rem, 2.8vw, 1.65rem);
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    margin: 0 0 20px;
}
.px-tpl-faq__list {
    max-width: 820px;
    margin: 0 auto;
}
.px-tpl-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #fff;
    overflow: hidden;
}
.px-tpl-faq-item summary {
    cursor: pointer;
    font-weight: 700;
    color: #1e293b;
    padding: 16px 18px;
    list-style: none;
}
.px-tpl-faq-item summary::-webkit-details-marker { display: none; }
.px-tpl-faq-item p {
    margin: 0;
    padding: 0 18px 16px;
    color: #64748b;
    line-height: 1.6;
    font-size: 0.94rem;
}
.px-tpl-bottom-cta {
    margin-top: 48px;
    text-align: center;
    padding: 36px 24px;
    border-radius: 14px;
    background: linear-gradient(145deg, #0f1b3d 0%, #1a2e6e 100%);
    color: #fff;
}
.px-tpl-bottom-cta__title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    margin: 0 0 10px;
}
.px-tpl-bottom-cta__sub {
    margin: 0 auto 20px;
    max-width: 560px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}
.px-tpl-preview-modal__desc {
    margin: 6px 0 0;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.45;
}
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.px-templates-grid-wrap {
    padding: 8px 0 24px;
}
.px-tpl-region-cards {
    margin: 0 auto 32px;
    max-width: 880px;
    text-align: center;
}
.px-tpl-region-cards__label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 16px;
    line-height: 1.5;
}
.px-tpl-region-cards__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.px-tpl-region-card {
    appearance: none;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 14px;
    padding: 18px 14px 16px;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}
.px-tpl-region-card:hover {
    border-color: #1e4976;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.px-tpl-region-card.is-active {
    background: #1e4976;
    border-color: #1e4976;
    color: #fff;
    box-shadow: 0 8px 28px rgba(30, 73, 118, 0.28);
    transform: translateY(-1px);
}
.px-tpl-region-card__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.px-tpl-region-card.is-active .px-tpl-region-card__name {
    color: #fff;
}
.px-tpl-region-card__doc {
    font-size: 0.82rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.3;
}
.px-tpl-region-card.is-active .px-tpl-region-card__doc {
    color: rgba(255, 255, 255, 0.82);
}
.px-tpl-region-card__count {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #475569;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 999px;
}
.px-tpl-region-card.is-active .px-tpl-region-card__count {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}
.px-template-card__thumb--image {
    height: auto;
    min-height: 0;
    padding: 16px 16px 12px;
    background: linear-gradient(165deg, #eef2f7 0%, #f8fafc 55%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
}
.px-template-card__frame {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.06),
        0 8px 24px rgba(15, 23, 42, 0.08);
    line-height: 0;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.px-template-card:hover .px-template-card__frame {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--px-tpl-tone, #1e4976) 35%, #cbd5e1);
    box-shadow:
        0 2px 4px rgba(15, 23, 42, 0.06),
        0 14px 32px rgba(15, 23, 42, 0.12);
}
.px-template-card__thumb--image .px-template-card__img {
    width: 100%;
    height: auto;
    max-height: none;
    display: block;
    object-fit: contain;
    object-position: top center;
    vertical-align: top;
}
.px-tpl-preview-modal__img {
    display: block;
    width: auto;
    height: auto;
    max-width: none;
    margin: 0 auto;
    border-radius: 6px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
    background: #fff;
}
.px-tpl-services {
    padding: 48px 0 40px;
    max-width: 960px;
    margin: 0 auto;
}
.px-tpl-services__title {
    font-size: clamp(1.35rem, 2.8vw, 1.75rem);
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    margin: 0 0 12px;
    line-height: 1.3;
}
.px-tpl-services__sub {
    text-align: center;
    color: #64748b;
    font-size: 0.98rem;
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto 28px;
}
.px-tpl-services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.px-tpl-services-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px 22px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.px-tpl-services-card:hover {
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.09);
    transform: translateY(-2px);
}
.px-tpl-services-card h3 {
    font-size: 1.08rem;
    font-weight: 700;
    color: #1e4976;
    margin: 0 0 10px;
    line-height: 1.35;
}
.px-tpl-services-card p {
    margin: 0 0 14px;
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.55;
}
.px-tpl-services-card ul {
    margin: 0;
    padding: 0 0 0 18px;
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.6;
}
.px-tpl-services-card li + li {
    margin-top: 6px;
}
.px-tpl-panel-head {
    text-align: center;
    margin-bottom: 22px;
}
.px-tpl-panel-head__title {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}
.px-tpl-panel-head__sub {
    margin: 0 auto;
    max-width: 640px;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.55;
}
.px-tpl-region-panel[hidden] {
    display: none !important;
}
.px-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
    align-items: stretch;
}
.px-template-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    border-top: 3px solid var(--px-tpl-tone, #1e4976);
}
.px-template-card:hover {
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.11);
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--px-tpl-tone, #1e4976) 28%, #e2e8f0);
}
.px-template-card__thumb {
    display: block;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
}
.px-template-card__thumb--placeholder {
    aspect-ratio: 820 / 510;
    background: linear-gradient(145deg, color-mix(in srgb, var(--px-tpl-tone, #94a3b8) 18%, #f8fafc) 0%, #e2e8f0 100%);
}
.px-template-card__placeholder-art {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #94a3b8;
    pointer-events: none;
}
.px-template-card__placeholder-icon {
    font-size: 2rem;
    line-height: 1;
    opacity: 0.65;
}
.px-template-card__placeholder-text {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.px-template-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, background 0.22s ease;
    background: rgba(15, 23, 42, 0);
}
.px-template-card:hover .px-template-card__overlay,
.px-template-card:focus-within .px-template-card__overlay {
    opacity: 1;
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.28);
}
.px-template-card__preview-btn {
    appearance: none;
    background: #fff;
    border: none;
    border-radius: 24px;
    padding: 10px 28px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.px-template-card__preview-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.32);
}
.px-template-card__thumb:not(.px-template-card__thumb--image) img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}
.px-template-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #fff;
}
.px-template-card__title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
    line-height: 1.35;
}
.px-template-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
    margin-top: auto;
}
.px-template-card__link,
.px-template-card__use {
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 8px;
    padding: 9px 12px;
    text-align: center;
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.px-template-card__link {
    color: #1e4976;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font-family: inherit;
}
.px-template-card__link:hover {
    background: #e2e8f0;
}
.px-template-card__use {
    color: #fff;
    background: #e2231a;
    border: 1px solid #e2231a;
}
.px-template-card__use:hover {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}
.px-marketing-strip {
    text-align: center;
    margin-top: 40px;
    padding: 28px 20px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
}
.px-marketing-strip p {
    margin: 0 0 12px;
    color: #475569;
    font-weight: 600;
}
.px-marketing-strip__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 18px;
}
.px-marketing-strip__links a {
    color: #1e4976;
    font-weight: 600;
    text-decoration: none !important;
}
.px-app-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px 24px;
    margin-top: 8px;
}
.px-app-badges img {
    height: auto;
        max-width: 100%;
    }
.px-app-banner {
    display: block;
    width: min(100%, 1040px);
    margin: 28px auto 0;
    padding: 0;
    border: 0;
    border-radius: clamp(12px, 2.2vw, 18px);
    overflow: hidden;
    line-height: 0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}
.px-app-banner img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    vertical-align: top;
    object-fit: contain;
}

/* Dual device showcase — payroll SaaS product section (no clip wrappers) */
.px-app-device-showcase {
    width: 100%;
    max-width: 1120px;
    margin: 40px auto 48px;
    padding: clamp(28px, 4vw, 40px) clamp(18px, 3vw, 28px) clamp(32px, 4vw, 44px);
    background: linear-gradient(180deg, #f7fafc 0%, #ffffff 72%);
    border: 1px solid #e6edf5;
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(15, 36, 68, 0.06);
}
.px-app-device-showcase__intro {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 28px;
}
.px-app-device-showcase__eyebrow {
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1e4976;
}
.px-app-device-showcase__title {
    margin: 0 0 10px;
    font-size: clamp(1.35rem, 2.8vw, 1.75rem);
    font-weight: 750;
    color: #0f172a;
    line-height: 1.2;
}
.px-app-device-showcase__sub {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.55;
}
.px-app-device-showcase__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.36fr) minmax(0, 0.64fr);
    gap: clamp(20px, 3vw, 36px);
    align-items: end;
    width: 100%;
}
.px-app-device-showcase__col {
    min-width: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

/* Phone demo (left) — natural scale, reserved height, no clipping */
.px-app-phone-demo {
    --psx-demo-blue: #0756d8;
    --psx-demo-blue-3: #0b2f74;
    --psx-demo-success: #17a66a;
    --phone-w: 342px;
    --phone-h: 694px;
    --phone-scale: min(1, 100cqi / 380px);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    container-type: inline-size;
    background: transparent;
}
.px-app-phone-demo .phone-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: calc((var(--phone-h) + 72px) * var(--phone-scale));
    padding: 8px 0 0;
}
.px-app-phone-demo .phone-stage-inner {
    position: relative;
    width: var(--phone-w);
    transform: scale(var(--phone-scale));
    transform-origin: top center;
}
.px-app-phone-demo .phone-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 390px;
    height: 390px;
    margin-left: -195px;
    margin-top: -80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26, 100, 235, 0.18) 0%, rgba(26, 100, 235, 0.05) 42%, transparent 70%);
    filter: blur(3px);
    pointer-events: none;
}
.px-app-phone-demo .phone-shadow {
    position: absolute;
    left: 50%;
    bottom: 58px;
    width: 270px;
    height: 36px;
    margin-left: -135px;
    border-radius: 50%;
    background: rgba(20, 39, 76, 0.16);
    filter: blur(18px);
    pointer-events: none;
}
.px-app-phone-demo .phone {
    width: var(--phone-w);
    height: var(--phone-h);
    padding: 9px;
    border-radius: 52px;
    background: linear-gradient(145deg, #0c1018 0%, #38404e 45%, #111722 75%, #515866 100%);
    box-shadow:
        0 35px 70px rgba(15, 32, 61, 0.26),
        inset 0 0 0 1px rgba(255, 255, 255, 0.28),
        inset 0 0 0 3px rgba(0, 0, 0, 0.45);
    position: relative;
    transform: rotate(3deg);
    transform-origin: center;
    animation: pxAppPhoneFloat 5.2s ease-in-out infinite;
    z-index: 1;
}
.px-app-phone-demo .phone::before {
    content: "";
    position: absolute;
    left: -3px;
    top: 130px;
    width: 3px;
    height: 74px;
    border-radius: 3px 0 0 3px;
    background: #202633;
    box-shadow: 0 92px 0 #202633;
}
.px-app-phone-demo .phone::after {
    content: "";
    position: absolute;
    right: -3px;
    top: 160px;
    width: 3px;
    height: 95px;
    border-radius: 0 3px 3px 0;
    background: #202633;
}
@keyframes pxAppPhoneFloat {
    0%, 100% { transform: translateY(0) rotate(3deg); }
    50% { transform: translateY(-12px) rotate(2.3deg); }
}
.px-app-phone-demo .screen {
    width: 100%;
    height: 100%;
    background: #fbfcfe;
    border-radius: 44px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.px-app-phone-demo .dynamic-island {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 102px;
    height: 29px;
    border-radius: 18px;
    background: #050505;
    z-index: 30;
}
.px-app-phone-demo .statusbar {
    height: 48px;
    padding: 13px 24px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    color: #111827;
    font-size: 11px;
    font-weight: 800;
    position: relative;
    z-index: 2;
}
.px-app-phone-demo .status-icons { letter-spacing: 1px; font-size: 10px; }
.px-app-phone-demo .app-shell { height: calc(100% - 48px); position: relative; }
.px-app-phone-demo .app-top {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid #f0f2f5;
    background: rgba(255, 255, 255, 0.95);
}
.px-app-phone-demo .app-logo-img { width: 116px; height: auto; display: block; }
.px-app-phone-demo .avatar {
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: linear-gradient(145deg, #dfe8f7, #f9fbff);
    display: grid;
    place-items: center;
    color: #46607d;
    font-weight: 800;
    font-size: 11px;
    border: 1px solid #dce3ed;
}
.px-app-phone-demo .viewport {
    position: relative;
    height: calc(100% - 56px - 62px);
    overflow: hidden;
    background: #fbfcfe;
}
.px-app-phone-demo .screen-panel {
    position: absolute;
    inset: 0;
    padding: 16px 17px 22px;
    opacity: 0;
    transform: translateX(18px) scale(0.985);
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
}
.px-app-phone-demo .screen-panel.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}
.px-app-phone-demo .screen-panel.exit-left {
    opacity: 0;
    transform: translateX(-20px) scale(0.985);
}
.px-app-phone-demo .mini-eyebrow {
    font-size: 10px;
    font-weight: 800;
    color: #98a2b3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.px-app-phone-demo .mini-title {
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 6px 0 5px;
    color: #101828;
}
.px-app-phone-demo .mini-sub {
    font-size: 11px;
    color: #7b8494;
    line-height: 1.45;
    margin: 0;
}
.px-app-phone-demo .hero-balance {
    background: linear-gradient(135deg, #0c5ae0, #083b9d);
    color: #fff;
    border-radius: 18px;
    padding: 17px;
    margin-top: 15px;
    box-shadow: 0 12px 30px rgba(7, 86, 216, 0.2);
}
.px-app-phone-demo .hero-balance .small { font-size: 10px; opacity: 0.75; }
.px-app-phone-demo .hero-balance .amount {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-top: 4px;
}
.px-app-phone-demo .hero-balance .period { font-size: 9px; opacity: 0.76; margin-top: 8px; }
.px-app-phone-demo .stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 10px;
}
.px-app-phone-demo .stat-card {
    background: #fff;
    border: 1px solid #e9edf3;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 6px 18px rgba(28, 46, 80, 0.035);
}
.px-app-phone-demo .stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #eef5ff;
    color: var(--psx-demo-blue);
    display: grid;
    place-items: center;
    font-size: 13px;
    margin-bottom: 9px;
}
.px-app-phone-demo .stat-label { font-size: 9px; color: #98a2b3; }
.px-app-phone-demo .stat-value { font-size: 15px; font-weight: 800; margin-top: 2px; color: #101828; }
.px-app-phone-demo .recent { margin-top: 17px; }
.px-app-phone-demo .section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}
.px-app-phone-demo .section-row strong { font-size: 11px; color: #101828; }
.px-app-phone-demo .section-row span { font-size: 9px; color: var(--psx-demo-blue); font-weight: 700; }
.px-app-phone-demo .recent-item {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    gap: 9px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eef1f4;
}
.px-app-phone-demo .doc-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #eef5ff;
    color: var(--psx-demo-blue);
    display: grid;
    place-items: center;
    font-size: 13px;
}
.px-app-phone-demo .recent-name { font-size: 10px; font-weight: 700; color: #101828; }
.px-app-phone-demo .recent-date { font-size: 8px; color: #98a2b3; margin-top: 2px; }
.px-app-phone-demo .recent-status {
    font-size: 8px;
    color: var(--psx-demo-success);
    background: #eaf8f2;
    padding: 3px 6px;
    border-radius: 999px;
}
.px-app-phone-demo .panel-cta {
    position: absolute;
    left: 17px;
    right: 17px;
    bottom: 18px;
}
.px-app-phone-demo .primary-mobile {
    border: 0;
    background: var(--psx-demo-blue);
    color: #fff;
    border-radius: 13px;
    padding: 13px 15px;
    font-size: 11px;
    font-weight: 800;
    width: 100%;
    box-shadow: 0 10px 22px rgba(7, 86, 216, 0.19);
    cursor: default;
}
.px-app-phone-demo .field-stack { display: grid; gap: 10px; margin-top: 15px; }
.px-app-phone-demo .mobile-field {
    padding: 10px 11px;
    background: #fff;
    border: 1px solid #e1e6ee;
    border-radius: 12px;
    min-height: 49px;
}
.px-app-phone-demo .mobile-field.focused {
    border-color: #73a4ff;
    box-shadow: 0 0 0 3px rgba(7, 86, 216, 0.08);
}
.px-app-phone-demo .mobile-field label {
    display: block;
    color: #98a2b3;
    font-size: 8px;
    font-weight: 700;
    margin-bottom: 4px;
}
.px-app-phone-demo .mobile-field .value {
    font-size: 11px;
    font-weight: 700;
    color: #283548;
    min-height: 15px;
}
.px-app-phone-demo .cursor::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 12px;
    background: var(--psx-demo-blue);
    margin-left: 2px;
    vertical-align: -2px;
    animation: pxAppDemoBlink 0.75s steps(1) infinite;
}
@keyframes pxAppDemoBlink { 50% { opacity: 0; } }
.px-app-phone-demo .progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 14px;
}
.px-app-phone-demo .progress-label { font-size: 9px; color: #98a2b3; font-weight: 700; }
.px-app-phone-demo .progress-track {
    width: 122px;
    height: 5px;
    border-radius: 99px;
    background: #e8edf5;
    overflow: hidden;
}
.px-app-phone-demo .progress-fill {
    height: 100%;
    width: 33%;
    border-radius: 99px;
    background: var(--psx-demo-blue);
    transition: width 0.3s ease;
}
.px-app-phone-demo .earn-block { margin-top: 16px; }
.px-app-phone-demo .earn-row {
    display: grid;
    grid-template-columns: 1fr 60px 64px;
    gap: 7px;
    align-items: end;
    margin-top: 10px;
}
.px-app-phone-demo .earn-label { font-size: 9px; color: #7d8798; margin-bottom: 5px; }
.px-app-phone-demo .tiny-box {
    background: #fff;
    border: 1px solid #e2e7ee;
    border-radius: 11px;
    padding: 9px;
}
.px-app-phone-demo .tiny-box strong { font-size: 10px; color: #101828; }
.px-app-phone-demo .earn-bonus { margin-top: 10px; }
.px-app-phone-demo .earn-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding: 13px;
    border-radius: 13px;
    background: #f0f6ff;
}
.px-app-phone-demo .earn-total span { font-size: 9px; color: #60738e; }
.px-app-phone-demo .earn-total strong { font-size: 16px; color: var(--psx-demo-blue-3); }
.px-app-phone-demo .review-box {
    margin-top: 15px;
    border: 1px solid #e4e9ef;
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
}
.px-app-phone-demo .review-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 13px;
    border-bottom: 1px solid #edf0f4;
}
.px-app-phone-demo .review-line:last-child { border-bottom: 0; }
.px-app-phone-demo .review-line span { font-size: 9px; color: #758095; }
.px-app-phone-demo .review-line strong { font-size: 11px; color: #101828; }
.px-app-phone-demo .review-line.net { background: #eef5ff; }
.px-app-phone-demo .review-line.net span,
.px-app-phone-demo .review-line.net strong { color: var(--psx-demo-blue-3); }
.px-app-phone-demo .review-line.net strong { font-size: 16px; }
.px-app-phone-demo .review-paydate { margin-top: 12px; }
.px-app-phone-demo .generate-center {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
}
.px-app-phone-demo .spinner {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(var(--psx-demo-blue) var(--spin, 0deg), #e7eef9 0);
    display: grid;
    place-items: center;
    position: relative;
    margin-bottom: 20px;
}
.px-app-phone-demo .spinner::after {
    content: "";
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
}
.px-app-phone-demo .spinner-value {
    position: relative;
    z-index: 1;
    font-size: 13px;
    font-weight: 800;
    color: var(--psx-demo-blue-3);
}
.px-app-phone-demo .generate-center .generate-heading {
    font-size: 18px;
    margin: 0 0 6px;
    letter-spacing: -0.03em;
    color: #101828;
}
.px-app-phone-demo .generate-center p {
    font-size: 10px;
    color: #8892a2;
    line-height: 1.5;
    margin: 0;
}
.px-app-phone-demo .success-check {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: #eaf8f2;
    color: var(--psx-demo-success);
    display: grid;
    place-items: center;
    font-size: 35px;
    font-weight: 900;
    box-shadow: 0 0 0 10px rgba(23, 166, 106, 0.055);
    margin-bottom: 20px;
    transform: scale(0.75);
    opacity: 0;
}
.px-app-phone-demo .active .success-check {
    animation: pxAppDemoPopCheck 0.45s 0.08s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}
@keyframes pxAppDemoPopCheck { to { transform: scale(1); opacity: 1; } }
.px-app-phone-demo .success-net {
    font-size: 26px;
    font-weight: 850;
    letter-spacing: -0.04em;
    color: #0b2f74;
    margin-top: 16px;
}
.px-app-phone-demo .success-net-label { font-size: 9px; color: #98a2b3; margin-top: 3px; }
.px-app-phone-demo .success-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    width: 100%;
    margin-top: 20px;
}
.px-app-phone-demo .success-btn {
    border: 1px solid #dce4f1;
    background: #fff;
    border-radius: 12px;
    padding: 12px 8px;
    font-size: 9px;
    font-weight: 800;
    color: #344054;
    cursor: default;
}
.px-app-phone-demo .success-btn.primary {
    background: var(--psx-demo-blue);
    color: #fff;
    border-color: var(--psx-demo-blue);
}
.px-app-phone-demo .bottom-nav {
    height: 62px;
    border-top: 1px solid #e9edf2;
    background: #fff;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 4px 11px 8px;
}
.px-app-phone-demo .nav-item { text-align: center; color: #98a2b3; font-size: 8px; font-weight: 700; }
.px-app-phone-demo .nav-icon { font-size: 16px; line-height: 1.2; margin-bottom: 2px; }
.px-app-phone-demo .nav-item.active { color: var(--psx-demo-blue); }
.px-app-phone-demo .demo-step-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
}
.px-app-phone-demo .demo-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #d7deea;
    transition: 0.25s ease;
}
.px-app-phone-demo .demo-dot.active { width: 24px; background: var(--psx-demo-blue); }
.px-app-phone-demo .live-badge {
    position: absolute;
    right: 8px;
    top: 96px;
    z-index: 2;
    background: #fff;
    border: 1px solid #e1e7f0;
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: 0 18px 35px rgba(18, 41, 78, 0.12);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: pxAppDemoBadgeFloat 4s ease-in-out infinite;
}
.px-app-phone-demo .live-badge i {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #20b26b;
    box-shadow: 0 0 0 4px rgba(32, 178, 107, 0.1);
}
.px-app-phone-demo .live-badge span { font-size: 10px; font-weight: 800; color: #344054; }
@keyframes pxAppDemoBadgeFloat { 50% { transform: translateY(-7px); } }

@media (max-width: 980px) {
    .px-app-device-showcase {
        margin-bottom: 36px;
        padding: 24px 16px 28px;
    }
    .px-app-device-showcase__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 44px;
        align-items: center;
        max-width: 560px;
        margin: 0 auto;
    }
    .px-app-device-showcase__col {
        align-items: center;
    }
    .px-app-phone-demo {
        --phone-scale: min(1, 100cqi / 360px);
        max-width: 340px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .px-app-phone-demo .phone,
    .px-app-phone-demo .live-badge {
        animation: none;
    }
    .px-app-phone-demo .screen-panel {
        transition: none;
    }
}

/* /app iPad demo — natural scale, full frame, no clip wrappers */
.px-app-ipad-demo {
    --psx-ipad-blue: #0756d8;
    --psx-ipad-blue3: #0a2f73;
    --psx-ipad-success: #18a66a;
    --psx-ipad-line: #e6ebf2;
    --ipad-w: 760px;
    --ipad-h: 548px;
    --ipad-scale: min(1, 100cqi / 780px, (100vw - 64px) / 780px);
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    container-type: inline-size;
}
.px-app-ipad-demo__stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: calc((var(--ipad-h) + 72px) * var(--ipad-scale));
    background: transparent;
}
.px-app-ipad-demo__stage-inner {
    position: relative;
    width: var(--ipad-w);
    transform: scale(var(--ipad-scale));
    transform-origin: top center;
}
.px-app-ipad-demo .ipad-glow {
    position: absolute;
    left: 50%;
    top: 48%;
    width: 600px;
    height: 500px;
    margin-left: -300px;
    margin-top: -250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(38, 109, 238, 0.14) 0%, rgba(38, 109, 238, 0.04) 45%, transparent 73%);
    filter: blur(8px);
    pointer-events: none;
}
.px-app-ipad-demo .ipad-shadow {
    position: absolute;
    left: 50%;
    bottom: 48px;
    width: 520px;
    height: 45px;
    margin-left: -260px;
    border-radius: 50%;
    background: rgba(18, 39, 78, 0.14);
    filter: blur(22px);
    pointer-events: none;
}
.px-app-ipad-demo .live-badge {
    position: absolute;
    top: 14px;
    right: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border: 1px solid #e0e6ef;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 38px rgba(23, 44, 79, 0.12);
    animation: pxAppIpadBadgeFloat 4.3s ease-in-out infinite;
}
.px-app-ipad-demo .live-badge i {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1eb36d;
    box-shadow: 0 0 0 4px rgba(30, 179, 109, 0.1);
}
.px-app-ipad-demo .live-badge span {
    font-size: 10px;
    font-weight: 800;
    color: #344054;
}
@keyframes pxAppIpadBadgeFloat {
    50% { transform: translateY(-8px); }
}
.px-app-ipad-demo .ipad {
    position: relative;
    width: var(--ipad-w);
    height: var(--ipad-h);
    padding: 11px;
    border-radius: 36px;
    background: linear-gradient(145deg, #0e131d 0%, #3c4453 39%, #151b25 75%, #59606c 100%);
    box-shadow:
        0 44px 90px rgba(14, 34, 66, 0.27),
        inset 0 0 0 1px rgba(255, 255, 255, 0.27),
        inset 0 0 0 3px rgba(0, 0, 0, 0.4);
    transform: rotate(-1.7deg);
    animation: pxAppIpadFloat 5.4s ease-in-out infinite;
    z-index: 1;
}
.px-app-ipad-demo .ipad::before {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #1c222d;
    left: 50%;
    top: 7px;
    transform: translateX(-50%);
    z-index: 5;
    box-shadow: inset 0 0 0 1px #0d1015;
}
.px-app-ipad-demo .ipad::after {
    content: "";
    position: absolute;
    right: -3px;
    top: 105px;
    width: 3px;
    height: 78px;
    border-radius: 0 4px 4px 0;
    background: #202631;
}
@keyframes pxAppIpadFloat {
    0%, 100% { transform: translateY(0) rotate(-1.7deg); }
    50% { transform: translateY(-12px) rotate(-1.1deg); }
}
.px-app-ipad-demo .ipad-screen {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 27px;
    background: #f7f9fc;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.px-app-ipad-demo .ipad-app {
    display: grid;
    grid-template-columns: 170px 1fr;
    height: 100%;
}
.px-app-ipad-demo .ipad-sidebar {
    background: #fff;
    border-right: 1px solid var(--psx-ipad-line);
    padding: 18px 15px 14px;
    position: relative;
}
.px-app-ipad-demo .ipad-logo {
    width: 118px;
    height: auto;
    display: block;
    margin: 3px 0 22px 4px;
}
.px-app-ipad-demo .side-label {
    font-size: 8px;
    font-weight: 800;
    color: #a2abb9;
    letter-spacing: 0.08em;
    margin: 18px 8px 8px;
}
.px-app-ipad-demo .ipad-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.px-app-ipad-demo .ipad-nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    color: #748094;
    font-size: 10px;
    font-weight: 700;
}
.px-app-ipad-demo .ipad-nav-item .ico {
    width: 21px;
    height: 21px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    font-size: 10px;
    background: #f2f5f9;
}
.px-app-ipad-demo .ipad-nav-item.active {
    color: var(--psx-ipad-blue);
    background: #edf4ff;
}
.px-app-ipad-demo .ipad-nav-item.active .ico {
    background: #dceaff;
}
.px-app-ipad-demo .side-footer {
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 14px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-top: 1px solid #edf0f4;
    padding-top: 12px;
}
.px-app-ipad-demo .ipad-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #dce8f8, #f7faff);
    border: 1px solid #dde5ef;
    color: #49627e;
    font-size: 9px;
    font-weight: 800;
    flex-shrink: 0;
}
.px-app-ipad-demo .side-footer strong {
    display: block;
    font-size: 9px;
    color: #162033;
}
.px-app-ipad-demo .side-footer span {
    display: block;
    font-size: 7px;
    color: #98a2b3;
    margin-top: 2px;
}
.px-app-ipad-demo .ipad-main {
    min-width: 0;
    position: relative;
}
.px-app-ipad-demo .ipad-topbar {
    height: 56px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--psx-ipad-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}
.px-app-ipad-demo .topbar-left strong {
    display: block;
    font-size: 12px;
    color: #162033;
}
.px-app-ipad-demo .topbar-left span {
    display: block;
    font-size: 8px;
    color: #98a2b3;
    margin-top: 2px;
}
.px-app-ipad-demo .topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.px-app-ipad-demo .icon-btn {
    width: 29px;
    height: 29px;
    border-radius: 9px;
    border: 1px solid #e4e9ef;
    background: #fff;
    color: #6f798b;
    display: grid;
    place-items: center;
    font-size: 10px;
    padding: 0;
    cursor: default;
}
.px-app-ipad-demo .user-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #e4e9ef;
    background: #fff;
    padding: 4px 8px 4px 5px;
    border-radius: 10px;
    font-size: 8px;
    font-weight: 700;
    color: #162033;
}
.px-app-ipad-demo .user-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e8eef8;
    display: grid;
    place-items: center;
    color: #4a617d;
    font-size: 8px;
    font-weight: 800;
}
.px-app-ipad-demo .ipad-viewport {
    position: relative;
    height: calc(100% - 56px);
    overflow: hidden;
}
.px-app-ipad-demo .ipad-panel {
    position: absolute;
    inset: 0;
    padding: 18px 20px 20px;
    opacity: 0;
    transform: translateX(22px) scale(0.99);
    pointer-events: none;
    transition: opacity 0.34s ease, transform 0.34s ease;
}
.px-app-ipad-demo .ipad-panel.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}
.px-app-ipad-demo .ipad-panel.exit-left {
    opacity: 0;
    transform: translateX(-24px) scale(0.99);
}
.px-app-ipad-demo .eyebrow {
    font-size: 8px;
    color: #99a3b3;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.px-app-ipad-demo .title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}
.px-app-ipad-demo .title-row .ipad-heading {
    font-size: 24px;
    letter-spacing: -0.045em;
    margin: 4px 0 3px;
    color: #162033;
}
.px-app-ipad-demo .title-row p {
    margin: 0;
    color: #7c8698;
    font-size: 9px;
}
.px-app-ipad-demo .ipad-primary {
    border: 0;
    border-radius: 10px;
    background: var(--psx-ipad-blue);
    color: #fff;
    padding: 9px 12px;
    font-size: 9px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(7, 86, 216, 0.17);
    cursor: default;
    white-space: nowrap;
}
.px-app-ipad-demo .metric-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}
.px-app-ipad-demo .metric {
    border: 1px solid #e6ebf2;
    background: #fff;
    border-radius: 14px;
    padding: 13px;
    min-height: 84px;
    box-shadow: 0 5px 16px rgba(22, 36, 66, 0.028);
}
.px-app-ipad-demo .metric.blue {
    background: linear-gradient(135deg, #0b59df, #083b9e);
    color: #fff;
    border-color: transparent;
}
.px-app-ipad-demo .metric-label {
    font-size: 8px;
    color: #99a3b3;
}
.px-app-ipad-demo .metric.blue .metric-label {
    color: #cfe0ff;
}
.px-app-ipad-demo .metric-value {
    font-size: 21px;
    font-weight: 850;
    letter-spacing: -0.04em;
    margin-top: 7px;
    color: #162033;
}
.px-app-ipad-demo .metric.blue .metric-value {
    color: #fff;
}
.px-app-ipad-demo .metric-small {
    font-size: 8px;
    color: #8691a2;
    margin-top: 4px;
}
.px-app-ipad-demo .metric.blue .metric-small {
    color: #d8e5ff;
}
.px-app-ipad-demo .lower-grid {
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    gap: 10px;
    margin-top: 10px;
}
.px-app-ipad-demo .ipad-card {
    background: #fff;
    border: 1px solid #e5eaf1;
    border-radius: 14px;
    padding: 13px;
    min-height: 223px;
}
.px-app-ipad-demo .card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.px-app-ipad-demo .card-head strong {
    font-size: 10px;
    color: #162033;
}
.px-app-ipad-demo .card-head span {
    font-size: 8px;
    color: var(--psx-ipad-blue);
    font-weight: 700;
}
.px-app-ipad-demo .table-row {
    display: grid;
    grid-template-columns: 1.1fr 0.75fr 0.7fr auto;
    align-items: center;
    gap: 8px;
    min-height: 39px;
    border-top: 1px solid #eef1f4;
    font-size: 8px;
    color: #162033;
}
.px-app-ipad-demo .table-row:first-of-type {
    border-top: 0;
}
.px-app-ipad-demo .employee {
    display: flex;
    align-items: center;
    gap: 7px;
}
.px-app-ipad-demo .small-avatar {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #eef4fd;
    color: #48617d;
    display: grid;
    place-items: center;
    font-size: 7px;
    font-weight: 800;
    flex-shrink: 0;
}
.px-app-ipad-demo .status {
    font-size: 7px;
    font-weight: 700;
    color: var(--psx-ipad-success);
    background: #eaf8f2;
    padding: 3px 6px;
    border-radius: 999px;
    width: max-content;
}
.px-app-ipad-demo .chart {
    height: 126px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 7px;
    padding: 18px 6px 0;
}
.px-app-ipad-demo .bar {
    flex: 1;
    background: linear-gradient(180deg, #8cb5ff, #2f72ea);
    border-radius: 5px 5px 2px 2px;
    min-width: 12px;
    opacity: 0.9;
}
.px-app-ipad-demo .chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 7px;
    color: #9aa3b2;
    padding: 5px 3px 0;
}
.px-app-ipad-demo .progress {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 2px 0 14px;
}
.px-app-ipad-demo .progress span {
    font-size: 8px;
    font-weight: 700;
    color: #98a2b3;
}
.px-app-ipad-demo .progress-track {
    width: 150px;
    height: 5px;
    border-radius: 99px;
    background: #e9edf4;
    overflow: hidden;
}
.px-app-ipad-demo .progress-fill {
    height: 100%;
    background: var(--psx-ipad-blue);
    border-radius: 99px;
    transition: width 0.4s ease;
}
.px-app-ipad-demo .form-layout {
    display: grid;
    grid-template-columns: 1fr 196px;
    gap: 14px;
    margin-top: 12px;
}
.px-app-ipad-demo .form-card,
.px-app-ipad-demo .summary-card {
    background: #fff;
    border: 1px solid #e5eaf1;
    border-radius: 14px;
    padding: 14px;
}
.px-app-ipad-demo .form-card .ipad-subheading,
.px-app-ipad-demo .summary-card .ipad-subheading {
    font-size: 10px;
    margin: 0 0 11px;
    color: #162033;
}
.px-app-ipad-demo .field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}
.px-app-ipad-demo .field {
    min-height: 47px;
    border: 1px solid #e0e5ec;
    border-radius: 10px;
    padding: 8px 9px;
    background: #fff;
}
.px-app-ipad-demo .field.focus {
    border-color: #75a5ff;
    box-shadow: 0 0 0 3px rgba(7, 86, 216, 0.07);
}
.px-app-ipad-demo .field label {
    display: block;
    font-size: 7px;
    color: #98a2b3;
    font-weight: 700;
    margin-bottom: 4px;
}
.px-app-ipad-demo .field .value {
    font-size: 9px;
    font-weight: 700;
    min-height: 13px;
    color: #162033;
}
.px-app-ipad-demo .cursor::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 11px;
    background: var(--psx-ipad-blue);
    margin-left: 2px;
    vertical-align: -2px;
    animation: pxAppIpadBlink 0.75s steps(1) infinite;
}
@keyframes pxAppIpadBlink {
    50% { opacity: 0; }
}
.px-app-ipad-demo .summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid #edf1f5;
}
.px-app-ipad-demo .summary-line:last-child {
    border-bottom: 0;
}
.px-app-ipad-demo .summary-line span {
    font-size: 8px;
    color: #788395;
}
.px-app-ipad-demo .summary-line strong {
    font-size: 9px;
    color: #162033;
}
.px-app-ipad-demo .summary-line.net {
    margin-top: 4px;
    padding: 10px;
    background: #eff5ff;
    border-radius: 9px;
    border: 0;
}
.px-app-ipad-demo .summary-line.net span,
.px-app-ipad-demo .summary-line.net strong {
    color: var(--psx-ipad-blue3);
}
.px-app-ipad-demo .summary-line.net strong {
    font-size: 14px;
}
.px-app-ipad-demo .earn-table {
    margin-top: 10px;
    border: 1px solid #e5eaf1;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.px-app-ipad-demo .earn-head,
.px-app-ipad-demo .earn-r {
    display: grid;
    grid-template-columns: 1.3fr 0.5fr 0.55fr 0.7fr;
    gap: 8px;
    align-items: center;
}
.px-app-ipad-demo .earn-head {
    padding: 8px 10px;
    background: #f7f9fc;
    font-size: 7px;
    color: #9aa4b4;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.px-app-ipad-demo .earn-r {
    min-height: 41px;
    padding: 8px 10px;
    border-top: 1px solid #eef1f5;
    font-size: 8px;
    color: #162033;
}
.px-app-ipad-demo .earn-r strong {
    text-align: right;
}
.px-app-ipad-demo .earn-amt-head {
    text-align: right;
}
.px-app-ipad-demo .review-wrap {
    display: grid;
    grid-template-columns: 1fr 210px;
    gap: 14px;
    margin-top: 14px;
}
.px-app-ipad-demo .review-card {
    background: #fff;
    border: 1px solid #e5eaf1;
    border-radius: 14px;
    overflow: hidden;
}
.px-app-ipad-demo .review-row {
    display: grid;
    grid-template-columns: 1fr 100px;
    padding: 11px 13px;
    border-bottom: 1px solid #eef1f4;
    font-size: 8px;
    color: #162033;
}
.px-app-ipad-demo .review-row:last-child {
    border-bottom: 0;
}
.px-app-ipad-demo .review-row strong {
    text-align: right;
}
.px-app-ipad-demo .review-total {
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0b59df, #083b9e);
    color: #fff;
}
.px-app-ipad-demo .review-total .small {
    font-size: 8px;
    color: #d7e5ff;
}
.px-app-ipad-demo .review-total .net {
    font-size: 25px;
    font-weight: 850;
    letter-spacing: -0.04em;
    margin-top: 5px;
}
.px-app-ipad-demo .review-total .period {
    font-size: 7px;
    color: #d7e5ff;
    margin-top: 7px;
}
.px-app-ipad-demo .ipad-center {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.px-app-ipad-demo .ipad-spinner {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: conic-gradient(var(--psx-ipad-blue) var(--spin, 0deg), #e6edf8 0);
    display: grid;
    place-items: center;
    position: relative;
    margin-bottom: 16px;
}
.px-app-ipad-demo .ipad-spinner::after {
    content: "";
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #fff;
}
.px-app-ipad-demo .ipad-spinner span {
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 800;
    color: var(--psx-ipad-blue3);
}
.px-app-ipad-demo .ipad-center .ipad-subheading {
    margin: 0 0 6px;
    font-size: 18px;
    letter-spacing: -0.03em;
    color: #162033;
}
.px-app-ipad-demo .ipad-center p {
    margin: 0;
    color: #8791a2;
    font-size: 9px;
}
.px-app-ipad-demo .success-check {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e9f8f1;
    color: var(--psx-ipad-success);
    box-shadow: 0 0 0 10px rgba(24, 166, 106, 0.05);
    font-size: 33px;
    font-weight: 900;
    margin-bottom: 17px;
    transform: scale(0.75);
    opacity: 0;
}
.px-app-ipad-demo .active .success-check {
    animation: pxAppIpadPop 0.5s 0.12s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}
@keyframes pxAppIpadPop {
    to { transform: scale(1); opacity: 1; }
}
.px-app-ipad-demo .success-net {
    font-size: 29px;
    font-weight: 850;
    color: #0a2f73;
    letter-spacing: -0.045em;
    margin-top: 15px;
}
.px-app-ipad-demo .success-net-label {
    font-size: 8px;
    color: #98a2b3;
    margin-top: 3px;
    font-weight: 700;
}
.px-app-ipad-demo .ready-meta {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.px-app-ipad-demo .ready-pill {
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 8px 10px;
    background: #fff;
    font-size: 8px;
    font-weight: 700;
    color: #475467;
}
.px-app-ipad-demo .ready-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}
.px-app-ipad-demo .action {
    border: 1px solid #dfe5ee;
    background: #fff;
    color: #344054;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 8px;
    font-weight: 800;
    cursor: default;
}
.px-app-ipad-demo .action.primary {
    background: var(--psx-ipad-blue);
    color: #fff;
    border-color: var(--psx-ipad-blue);
}
.px-app-ipad-demo .ipad-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
}
.px-app-ipad-demo .ipad-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #d8dfeb;
    transition: 0.3s;
}
.px-app-ipad-demo .ipad-dot.active {
    width: 25px;
    background: var(--psx-ipad-blue);
}

@media (max-width: 900px) {
    .px-app-ipad-demo {
        --ipad-scale: min(1, 100cqi / 760px, (100vw - 48px) / 760px);
    }
    .px-app-ipad-demo .live-badge {
        right: 10px;
        top: 10px;
        padding: 8px 10px;
    }
}

@media (max-width: 640px) {
    .px-app-device-showcase {
        margin-left: 0;
        margin-right: 0;
        border-radius: 16px;
    }
    .px-app-ipad-demo {
        --ipad-scale: min(1, 100cqi / 760px, (100vw - 36px) / 760px);
    }
    .px-app-ipad-demo .live-badge span {
        font-size: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .px-app-ipad-demo .ipad,
    .px-app-ipad-demo .live-badge {
        animation: none;
    }
    .px-app-ipad-demo .ipad-panel {
        transition: none;
    }
}

.px-app-features {
    padding: 8px 0 28px;
}
.px-app-features__intro {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 28px;
}
.px-app-features__eyebrow {
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1e4976;
}
.px-app-features__title {
    margin: 0;
    font-size: clamp(1.35rem, 2.8vw, 1.7rem);
    font-weight: 750;
    color: #0f172a;
    line-height: 1.25;
}
.px-app-features__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.px-app-feature {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.px-app-feature:hover {
    border-color: #c9d7ea;
    box-shadow: 0 14px 32px rgba(15, 36, 68, 0.08);
    transform: translateY(-2px);
}
.px-app-feature h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}
.px-app-feature p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
    font-size: 0.95rem;
}
.px-app-breadcrumbs {
    padding: 18px 0 0;
}
.px-app-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.88rem;
    color: #64748b;
}
.px-app-breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin-left: 8px;
    color: #94a3b8;
}
.px-app-breadcrumbs a {
    color: #1e4976;
    font-weight: 600;
    text-decoration: none;
}
.px-app-breadcrumbs a:hover {
    text-decoration: underline;
}
.px-app-regions {
    padding: 12px 0 8px;
    margin-bottom: 8px;
}
.px-app-regions__intro {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 20px;
}
.px-app-regions__intro h2 {
    margin: 0 0 8px;
    font-size: clamp(1.25rem, 2.6vw, 1.55rem);
    font-weight: 750;
    color: #0f172a;
}
.px-app-regions__intro p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}
.px-app-regions__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.px-app-regions__list a {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #1e4976;
    font-weight: 650;
    font-size: 0.92rem;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}
.px-app-regions__list a:hover {
    border-color: #c9d7ea;
    background: #f8fafc;
}
.px-app-faq {
    margin-top: 28px;
}
@media (max-width: 980px) {
    .px-app-features__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    .px-app-features__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
body.px-tpl-modal-open {
    overflow: hidden;
}
.px-tpl-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.px-tpl-preview-modal[hidden] {
    display: none !important;
}
.px-tpl-preview-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    border: none;
    cursor: pointer;
}
.px-tpl-preview-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(1120px, 96vw);
    height: min(94vh, 920px);
    max-height: 94vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.38);
    display: flex;
    flex-direction: column;
}
.px-tpl-preview-modal__bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}
.px-tpl-preview-modal__eyebrow {
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}
.px-tpl-preview-modal__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}
.px-tpl-preview-modal__close {
    appearance: none;
    border: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 4px 10px;
    transition: background 0.15s ease, color 0.15s ease;
}
.px-tpl-preview-modal__close:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.px-tpl-preview-modal__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: #fff;
}
.px-tpl-preview-modal__toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
}
.px-tpl-preview-modal__toolbar[hidden] {
    display: none !important;
}
.px-tpl-preview-modal__zoom-btn {
    appearance: none;
    width: 40px;
    height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.px-tpl-preview-modal__zoom-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #1e4976;
    color: #1e4976;
}
.px-tpl-preview-modal__zoom-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.px-tpl-preview-modal__zoom-label {
    min-width: 52px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
}
.px-tpl-preview-modal__zoom-reset {
    appearance: none;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 9px 14px;
    cursor: pointer;
    margin-left: 4px;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.px-tpl-preview-modal__zoom-reset:hover {
    background: #eef2f7;
    border-color: #94a3b8;
}
.px-tpl-preview-modal__viewport {
    flex: 1;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: #cbd5e1;
    padding: 20px;
    min-height: 0;
    text-align: center;
}
.px-tpl-preview-modal__viewport[hidden] {
    display: none !important;
}
.px-tpl-preview-modal__canvas {
    display: inline-block;
    vertical-align: top;
    line-height: 0;
    min-width: min-content;
}
.px-tpl-preview-modal__placeholder-note {
    margin: 0;
    padding: 32px 24px;
    text-align: center;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.px-tpl-preview-modal__placeholder-note[hidden] {
    display: none !important;
}
@media (max-width: 767px) {
    .px-marketing-page {
        padding: 0 16px 48px;
    }
    .px-marketing-hero {
        padding: 32px 0 24px;
    }
    .px-app-banner {
        margin-top: 20px;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
    }
    .px-tpl-region-cards__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .px-tpl-region-card {
        padding: 14px 10px 12px;
    }
    .px-tpl-region-card__name {
        font-size: 0.98rem;
    }
    .px-tpl-services {
        padding: 36px 0 28px;
    }
    .px-tpl-preview-modal {
        padding: 0;
        align-items: stretch;
    }
    .px-tpl-preview-modal__dialog {
        width: 100%;
        height: 100%;
        max-height: 100dvh;
        border-radius: 0;
    }
    .px-tpl-preview-modal__bar {
        padding: 14px 16px;
    }
    .px-tpl-preview-modal__title {
        font-size: 1.05rem;
    }
    .px-tpl-preview-modal__viewport {
        padding: 12px;
    }
    .px-tpl-preview-modal__zoom-btn {
        width: 44px;
        height: 44px;
    }
    .px-templates-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
    .px-template-card__thumb--image {
        padding: 12px 12px 10px;
    }
    .px-template-card__actions {
        grid-template-columns: 1fr;
    }
}

/* ── Homepage audience cards (Who PaystubX Is For) ─────────────────────── */
.px-audience-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 56px 0 60px;
    border-bottom: 1px solid #e2e8f0;
}
.px-audience-section__inner {
    max-width: 1200px;
}
.px-audience-section__head {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 36px;
}
.px-audience-section__eyebrow {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #b45309;
}
.px-audience-section__title {
    margin: 0 0 14px;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.25;
    color: #0f172a;
}
.px-audience-section__lead {
    margin: 0;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    line-height: 1.65;
    color: #64748b;
}
.px-audience-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}
.px-audience-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.px-audience-card:hover {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}
.px-audience-card--content-first {
    flex-direction: column;
}
.px-audience-card--image-first {
    flex-direction: column;
}
.px-audience-card--image-first .px-audience-card__media {
    order: -1;
}
.px-audience-card__content {
    padding: 22px 20px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.px-audience-card__title {
    margin: 0 0 10px;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
}
.px-audience-card__body {
    margin: 0 0 14px;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #475569;
    flex: 1;
}
.px-audience-card__cta {
    display: inline-block;
    font-size: 0.86rem;
    font-weight: 700;
    color: #1e4976;
    text-decoration: none !important;
    transition: color 0.15s ease;
}
.px-audience-card__cta:hover {
    color: #0f172a;
}
.px-audience-card__media {
    padding: 0 16px 16px;
    line-height: 0;
}
.px-audience-card--image-first .px-audience-card__media {
    padding: 16px 16px 0;
}
.px-audience-card__img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    aspect-ratio: 16 / 10;
    border: 1px solid #e2e8f0;
}
@media (max-width: 767px) {
    .px-audience-section {
        padding: 40px 0 44px;
    }
}
@media (max-width: 1199px) {
    .px-audience-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 575px) {
    .px-audience-grid {
        grid-template-columns: 1fr;
    }
    .px-audience-card--image-first .px-audience-card__media {
        order: 0;
    }
    .px-audience-card {
        flex-direction: column;
    }
    .px-audience-card__media {
        order: -1;
        padding: 0 !important;
    }
    .px-audience-card__img {
        border-radius: 0;
        border-left: none;
        border-right: none;
        aspect-ratio: 16 / 9;
    }
    .px-audience-card__content {
        padding: 20px 18px 22px;
    }
}

/* ── Homepage PaystubX walkthrough (extends Easy as A.B.C band) ─────────── */
.px-steps-loop {
    max-width: 1140px;
    margin: clamp(1.25rem, 3vw, 2rem) auto 0;
    padding: clamp(1rem, 2.5vw, 1.75rem) clamp(0.5rem, 2vw, 1rem) clamp(0.5rem, 2vw, 1rem);
    border-top: 1px solid rgba(61, 41, 24, 0.1);
}
.px-steps-loop__head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto clamp(1.25rem, 3vw, 2rem);
}
.px-steps-loop__eyebrow {
    margin: 0 0 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c21835;
}
.px-steps-loop__title {
    margin: 0 0 10px;
    font-size: clamp(1.25rem, 2.8vw, 1.75rem);
    font-weight: 600;
    color: #3d2918;
    line-height: 1.3;
    font-family: "Futura LT", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}
.px-steps-loop__lead {
    margin: 0;
    font-size: clamp(0.92rem, 1.8vw, 1.02rem);
    line-height: 1.6;
    color: #5c534a;
    font-family: "Futura LT", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}
.px-steps-loop__stage {
    overflow: hidden;
    padding: 8px 0 12px;
}
.px-steps-loop__track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 2.5vw, 22px);
    align-items: stretch;
    min-height: 380px;
}
.px-step-card {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(61, 41, 24, 0.1);
    border-radius: 20px;
    overflow: visible;
    box-shadow: 0 8px 28px rgba(61, 41, 24, 0.07);
    display: flex;
    flex-direction: column;
    transition:
        transform 0.75s cubic-bezier(0.34, 1.2, 0.64, 1),
        box-shadow 0.75s ease,
        opacity 0.75s ease,
        border-color 0.75s ease;
    opacity: 0.78;
    transform: scale(0.93);
    order: var(--slot, 0);
}
.px-step-card__ring {
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.75s ease;
    pointer-events: none;
}
.px-step-card.is-center .px-step-card__ring {
    opacity: 1;
    animation: px-step-ring-spin 8s linear infinite;
}
.px-step-card--a .px-step-card__ring {
    background: conic-gradient(from 225deg, #fb923c, #ea580c 18%, #c026d3 38%, #9333ea 52%, #84cc16 72%, #eab308 88%, #fb923c);
    padding: 3px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}
.px-step-card--b .px-step-card__ring {
    background: conic-gradient(from 145deg, #f59e0b, #ea580c 22%, #a855f7 48%, #6366f1 62%, #22c55e 82%, #f59e0b);
    padding: 3px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}
.px-step-card--c .px-step-card__ring {
    background: conic-gradient(from 310deg, #22c55e, #84cc16 24%, #eab308 44%, #ec4899 62%, #a855f7 80%, #22c55e);
    padding: 3px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}
@keyframes px-step-ring-spin {
    to { transform: rotate(360deg); }
}
.px-step-card[data-slot="0"] { --slot: 0; grid-column: 1; }
.px-step-card[data-slot="1"] {
    --slot: 1;
    grid-column: 2;
    opacity: 1;
    transform: scale(1.05);
    z-index: 2;
}
.px-step-card--a.is-center {
    box-shadow: 0 18px 48px rgba(194, 24, 53, 0.16);
    border-color: rgba(194, 24, 53, 0.25);
}
.px-step-card--b.is-center {
    box-shadow: 0 18px 48px rgba(67, 56, 202, 0.16);
    border-color: rgba(67, 56, 202, 0.25);
}
.px-step-card--c.is-center {
    box-shadow: 0 18px 48px rgba(21, 128, 61, 0.16);
    border-color: rgba(21, 128, 61, 0.25);
}
.px-step-card[data-slot="2"] { --slot: 2; grid-column: 3; }
.px-step-card__visual {
    position: relative;
    z-index: 1;
    padding: 14px 14px 0;
    line-height: 0;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}
.px-step-card--a .px-step-card__visual {
    background: linear-gradient(180deg, rgba(194, 24, 53, 0.08) 0%, #fff 70%);
}
.px-step-card--b .px-step-card__visual {
    background: linear-gradient(180deg, rgba(67, 56, 202, 0.08) 0%, #fff 70%);
}
.px-step-card--c .px-step-card__visual {
    background: linear-gradient(180deg, rgba(21, 128, 61, 0.08) 0%, #fff 70%);
}
.px-step-card__badge {
    position: absolute;
    top: 12px;
    left: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    z-index: 3;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
    font-family: "Futura LT", "Segoe UI", sans-serif;
}
.px-step-card--a .px-step-card__badge {
    background: linear-gradient(168deg, #c21835 0%, #7f1d1d 100%);
}
.px-step-card--b .px-step-card__badge {
    background: linear-gradient(168deg, #6366f1 0%, #4338ca 100%);
}
.px-step-card--c .px-step-card__badge {
    background: linear-gradient(168deg, #22c55e 0%, #15803d 100%);
}
.px-step-card.is-center .px-step-card__badge {
    animation: px-step-badge-pulse 2.4s ease-in-out infinite;
}
@keyframes px-step-badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.px-step-card__img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    border: 1px solid rgba(61, 41, 24, 0.12);
    box-shadow: 0 10px 32px rgba(61, 41, 24, 0.12);
    animation: px-step-img-float 5s ease-in-out infinite;
}
.px-step-card[data-slot="0"] .px-step-card__img { animation-delay: 0s; }
.px-step-card[data-slot="1"] .px-step-card__img { animation-delay: 1.6s; }
.px-step-card[data-slot="2"] .px-step-card__img { animation-delay: 3.2s; }
@keyframes px-step-img-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.px-step-card__body {
    position: relative;
    z-index: 1;
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 0 0 20px 20px;
}
.px-step-card__label {
    margin: 0 0 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
}
.px-step-card--a .px-step-card__label { color: #c21835; }
.px-step-card--b .px-step-card__label { color: #4338ca; }
.px-step-card--c .px-step-card__label { color: #15803d; }
.px-step-card__title {
    margin: 0 0 8px;
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
    font-weight: 700;
    color: #3d2918;
    line-height: 1.35;
    font-family: "Futura LT", "Segoe UI", sans-serif;
}
.px-step-card__text {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: #5c534a;
}
.px-steps-loop__dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}
.px-steps-loop__dot {
    appearance: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #d6d3d1;
    background: #fff;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.px-steps-loop__dot-letter {
    font-size: 0.82rem;
    font-weight: 800;
    color: #78716c;
    font-family: "Futura LT", "Segoe UI", sans-serif;
    line-height: 1;
}
.px-steps-loop__dots--a .px-steps-loop__dot.is-active {
    border-color: #c21835;
    background: linear-gradient(168deg, #c21835 0%, #7f1d1d 100%);
    box-shadow: 0 4px 16px rgba(194, 24, 53, 0.35);
}
.px-steps-loop__dots--b .px-steps-loop__dot.is-active {
    border-color: #4338ca;
    background: linear-gradient(168deg, #6366f1 0%, #4338ca 100%);
    box-shadow: 0 4px 16px rgba(67, 56, 202, 0.35);
}
.px-steps-loop__dots--c .px-steps-loop__dot.is-active {
    border-color: #15803d;
    background: linear-gradient(168deg, #22c55e 0%, #15803d 100%);
    box-shadow: 0 4px 16px rgba(21, 128, 61, 0.35);
}
.px-steps-loop__dot.is-active .px-steps-loop__dot-letter {
    color: #fff;
}
.px-steps-loop__dot:hover {
    transform: scale(1.06);
    border-color: #a8a29e;
}
.px-steps-loop__cta-wrap {
    text-align: center;
    margin: 22px 0 0;
}
.px-steps-loop__cta {
    border-radius: 999px;
    padding-left: 28px;
    padding-right: 28px;
    font-weight: 700;
}
@media (max-width: 991px) {
    .px-steps-loop__track {
        grid-template-columns: 1fr;
        min-height: 0;
        gap: 0;
        position: relative;
    }
    .px-step-card {
        grid-column: 1 !important;
        opacity: 0;
        transform: scale(0.92) translateY(12px);
        pointer-events: none;
        position: absolute;
        inset: 0;
        max-width: 420px;
        margin: 0 auto;
    }
    .px-step-card[data-slot="1"] {
        opacity: 1;
        transform: scale(1) translateY(0);
        pointer-events: auto;
        position: relative;
        inset: auto;
    }
    .px-step-card[data-slot="0"],
    .px-step-card[data-slot="2"] {
        visibility: hidden;
        height: 0;
        overflow: hidden;
        margin: 0;
        padding: 0;
        border: none;
    }
    .px-steps-loop__stage {
        min-height: 420px;
    }
}
@media (max-width: 575px) {
    .px-steps-loop__stage {
        min-height: 380px;
    }
    .px-step-card {
        max-width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════
   Payroll Ledger & YTD Tracking — feature landing page
═══════════════════════════════════════════════════════ */
.px-ledger-page {
    --px-ledger-ink: #0f172a;
    --px-ledger-muted: #475569;
    --px-ledger-line: #dbe3ee;
    --px-ledger-accent: #0f4c6e;
    --px-ledger-accent-soft: rgba(15, 76, 110, 0.08);
    --px-ledger-surface: #f4f7fa;
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px 72px;
    color: var(--px-ledger-ink);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
/* Atmosphere spacer removed — page background is applied on .px-ledger-page itself.
   Do not use `.px-ledger-page > * { position: relative }` (it forced empty spacers into flow). */

.px-ledger-breadcrumbs {
    padding: 28px 0 8px;
    font-size: 0.88rem;
}
.px-ledger-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--px-ledger-muted);
}
.px-ledger-breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin-left: 8px;
    color: #94a3b8;
}
.px-ledger-breadcrumbs a {
    color: var(--px-ledger-accent);
    text-decoration: none;
    font-weight: 600;
}
.px-ledger-breadcrumbs a:hover { text-decoration: underline; }

.px-ledger-hero {
    text-align: center;
    padding: 28px 0 48px;
    max-width: 820px;
    margin: 0 auto;
}
.px-ledger-kicker {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(15, 76, 110, 0.18);
    background: var(--px-ledger-accent-soft);
    color: var(--px-ledger-accent);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.px-ledger-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4.4vw, 3rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--px-ledger-ink);
}
.px-ledger-lead {
    margin: 0 0 14px;
    font-size: clamp(1.2rem, 2.4vw, 1.45rem);
    font-weight: 650;
    color: #1e3a4c;
    line-height: 1.35;
}
.px-ledger-sub {
    margin: 0 auto 14px;
    max-width: 720px;
    color: var(--px-ledger-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}
.px-ledger-sub--tight { margin-bottom: 28px; }
.px-ledger-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.px-ledger-cta-secondary {
    border-radius: 8px;
    font-weight: 600;
    padding: 12px 24px;
    color: var(--px-ledger-accent) !important;
    border: 1px solid rgba(15, 76, 110, 0.35) !important;
    background: #fff !important;
}
.px-ledger-cta-secondary:hover {
    background: var(--px-ledger-accent-soft) !important;
}

.px-ledger-section {
    padding: 36px 0;
    border-top: 1px solid var(--px-ledger-line);
}
.px-ledger-section__intro {
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
}
.px-ledger-section__intro h2 {
    margin: 0 0 12px;
    font-size: clamp(1.45rem, 2.8vw, 1.9rem);
    font-weight: 750;
    letter-spacing: -0.015em;
}
.px-ledger-section__intro p {
    margin: 0;
    color: var(--px-ledger-muted);
    line-height: 1.7;
    font-size: 1.02rem;
}

.px-ledger-example {
    max-width: 680px;
    margin: 0 auto 28px;
    padding: 24px 28px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fff 0%, var(--px-ledger-surface) 100%);
    border: 1px solid var(--px-ledger-line);
}
.px-ledger-example__title {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}
.px-ledger-example__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}
.px-ledger-example__steps li {
    display: grid;
    grid-template-columns: 110px 1fr 1fr;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e8eef4;
    font-size: 0.95rem;
}
.px-ledger-example__label {
    font-weight: 700;
    color: var(--px-ledger-accent);
}

.px-ledger-feature-grid,
.px-ledger-regions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.px-ledger-feature,
.px-ledger-regions article {
    padding: 22px 22px 18px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--px-ledger-line);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}
.px-ledger-feature h3,
.px-ledger-regions article h3 {
    margin: 0 0 10px;
    font-size: 1.12rem;
    font-weight: 700;
}
.px-ledger-feature p,
.px-ledger-regions article p {
    margin: 0 0 14px;
    color: var(--px-ledger-muted);
    line-height: 1.65;
    font-size: 0.96rem;
}
.px-ledger-feature a,
.px-ledger-regions article a,
.px-ledger-related a {
    color: var(--px-ledger-accent);
    font-weight: 650;
    text-decoration: none;
}
.px-ledger-feature a:hover,
.px-ledger-regions article a:hover,
.px-ledger-related a:hover { text-decoration: underline; }

.px-ledger-chip-list,
.px-ledger-checklist {
    list-style: none;
    margin: 0 auto 24px;
    padding: 0;
    max-width: 760px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.px-ledger-chip-list li,
.px-ledger-checklist li {
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--px-ledger-line);
    font-weight: 600;
    font-size: 0.92rem;
    color: #1e293b;
}
.px-ledger-checklist li {
    position: relative;
    padding-left: 36px;
    font-weight: 550;
}
.px-ledger-checklist li::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-radius: 50%;
    background: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}
.px-ledger-callout {
    max-width: 760px;
    margin: 0 auto;
    padding: 18px 22px;
    border-left: 4px solid var(--px-ledger-accent);
    background: var(--px-ledger-accent-soft);
    border-radius: 0 12px 12px 0;
    color: #1e293b;
    line-height: 1.65;
    font-weight: 600;
}

.px-ledger-shot {
    margin: 0 auto 8px;
    max-width: 720px;
}
.px-ledger-shot-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 8px;
}
.px-ledger-shot figcaption {
    margin-top: 10px;
    text-align: center;
    color: var(--px-ledger-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}
.px-ledger-mock {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #c9d5e3;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}
.px-ledger-mock__chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: linear-gradient(180deg, #1b3348 0%, #0f4c6e 100%);
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 600;
}
.px-ledger-mock__chrome span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
}
.px-ledger-mock__chrome em {
    margin-left: 8px;
    font-style: normal;
    letter-spacing: 0.02em;
}
.px-ledger-mock__body { padding: 8px 0; }
.px-ledger-mock__row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    border-bottom: 1px solid #eef2f7;
}
.px-ledger-mock__row--head {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #64748b;
    background: #f8fafc;
}
.px-ledger-mock__row--net {
    background: #f0f7f5;
    font-weight: 700;
    border-bottom: 0;
}
.px-ledger-mock__form,
.px-ledger-mock__opening {
    display: grid;
    gap: 12px;
    padding: 18px;
}
.px-ledger-mock__form div,
.px-ledger-mock__opening div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e8eef4;
    font-size: 0.92rem;
}
.px-ledger-mock__form label {
    color: #64748b;
    font-weight: 600;
}
.px-ledger-mock__list,
.px-ledger-mock__history {
    list-style: none;
    margin: 0;
    padding: 12px;
}
.px-ledger-mock__list li,
.px-ledger-mock__history li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e8eef4;
    font-size: 0.9rem;
}
.px-ledger-mock__list li span,
.px-ledger-mock__history li span { color: #64748b; }
.px-ledger-mock__opening p {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
}
.px-ledger-mock__badge {
    justify-content: center !important;
    background: rgba(15, 118, 110, 0.1) !important;
    border-color: rgba(15, 118, 110, 0.2) !important;
    color: #0f766e;
    font-weight: 700;
}

.px-ledger-faq__list {
    max-width: 760px;
    margin: 0 auto;
    display: grid;
    gap: 10px;
}
.px-ledger-cta-band {
    margin-top: 24px;
    padding: 40px 28px;
    text-align: center;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(15, 76, 110, 0.08), rgba(15, 118, 110, 0.08)),
        #fff;
    border: 1px solid var(--px-ledger-line);
}
.px-ledger-cta-band h2 {
    margin: 0 0 10px;
    font-size: clamp(1.35rem, 2.6vw, 1.75rem);
}
.px-ledger-cta-band > p {
    margin: 0 auto 22px;
    max-width: 620px;
    color: var(--px-ledger-muted);
    line-height: 1.65;
}
.px-ledger-related {
    margin: 22px 0 0 !important;
    font-size: 0.9rem;
}

.px-ledger-seo-band {
    margin: 18px auto 8px;
    max-width: 1100px;
    padding: 0 16px;
}
.px-ledger-seo-band__inner {
    padding: 16px 20px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(15, 76, 110, 0.07), rgba(15, 118, 110, 0.06));
    border: 1px solid rgba(15, 76, 110, 0.14);
}
.px-ledger-seo-band__title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}
.px-ledger-seo-band__title a,
.px-ledger-seo-band__text a,
.px-ledger-inline-link a {
    color: var(--px-ledger-accent, #0f4c6e);
    font-weight: 700;
    text-decoration: none;
}
.px-ledger-seo-band__title a:hover,
.px-ledger-seo-band__text a:hover,
.px-ledger-inline-link a:hover { text-decoration: underline; }
.px-ledger-seo-band__text,
.px-ledger-inline-link {
    margin: 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}
.px-ledger-inline-link {
    margin: 12px 0 18px;
    text-align: center;
}

@media (max-width: 820px) {
    .px-ledger-feature-grid,
    .px-ledger-regions,
    .px-ledger-shot-pair,
    .px-ledger-chip-list,
    .px-ledger-checklist {
        grid-template-columns: 1fr;
    }
    .px-ledger-example__steps li {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
@media (max-width: 575px) {
    .px-ledger-page { padding-left: 16px; padding-right: 16px; }
    .px-ledger-hero { padding-top: 12px; }
    .px-ledger-mock__row { font-size: 0.82rem; padding-left: 12px; padding-right: 12px; }
}

/* ================================================================
   USA paystub ONLY — compact mobile/iPad action toolbar
   Root cause: shared .psx-paystub-toolbar uses justify-content:space-between
   + flex-grow children; mobile rules force flex-direction:column, which
   stretches the card into a giant empty gap. Desktop (≥1025) untouched.
   ================================================================ */

/* Phone: compact vertical stack — height from content only */
@media (max-width: 767px) {
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-actions-row {
        margin-top: 12px !important;
        margin-bottom: 0 !important;
        /* Copyright footer sits under the toolbar; do not reserve 72px or mobile
           shows a tall empty band between Generate and © PaystubX Inc. */
        padding-bottom: 8px !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .usa-btn {
        padding: 0 !important;
        margin: 0 !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar[data-psx-toolbar-region="usa"],
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-actions.psx-paystub-toolbar,
    #submit_form_paystubx_id.psx-paystub-form--usa .usa-btn-inner.psx-paystub-toolbar {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 16px !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        flex: 0 0 auto !important;
        flex-grow: 0 !important;
        padding: 14px 12px !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar__status {
        flex: 0 0 auto !important;
        flex-grow: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar__actions {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        flex: 0 0 auto !important;
        flex-grow: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar__btn,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar .previewbtn,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar .psx-paystub-save-draft {
        width: 100% !important;
        max-width: none !important;
        flex: 0 0 auto !important;
        min-height: 48px !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
    }

    /* Split Generate: full-width row; caret stays a professional fixed width */
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar__split {
        display: flex !important;
        width: 100% !important;
        max-width: none !important;
        align-items: stretch !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar__btn--primary,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar .emailbtn,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar .sendMailButton {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: none !important;
        min-height: 48px !important;
        border-radius: 10px 0 0 10px !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar__btn--primary-caret {
        flex: 0 0 48px !important;
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
        min-height: 48px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        border-radius: 0 10px 10px 0 !important;
    }

    /* Keep scroll-top out of the action buttons (safe zone via row padding) */
    body:has(#submit_form_paystubx_id.psx-paystub-form--usa) #scrollTopBtn.scroll-top-btn,
    body:has(#submit_form_paystubx_id.psx-paystub-form--usa) .scroll-top-btn {
        bottom: 16px !important;
        right: 14px !important;
    }
}

@media (max-width: 374px) {
    body:has(#submit_form_paystubx_id.psx-paystub-form--usa) #scrollTopBtn.scroll-top-btn,
    body:has(#submit_form_paystubx_id.psx-paystub-form--usa) .scroll-top-btn {
        bottom: 14px !important;
        right: 10px !important;
    }
}

/* iPad / tablet: compact horizontal action row (reference layout) */
@media (min-width: 768px) and (max-width: 1024px) {
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-actions-row {
        padding-bottom: 0.5rem !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar[data-psx-toolbar-region="usa"],
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-actions.psx-paystub-toolbar,
    #submit_form_paystubx_id.psx-paystub-form--usa .usa-btn-inner.psx-paystub-toolbar {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px 16px !important;
        height: auto !important;
        min-height: 0 !important;
        flex-grow: 0 !important;
        padding: 14px 16px !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar__status {
        flex: 1 1 200px !important;
        min-width: min(100%, 200px) !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar__actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 10px !important;
        flex: 0 1 auto !important;
        width: auto !important;
        margin: 0 !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar__btn,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar .previewbtn,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar .emailbtn {
        width: auto !important;
        flex: 0 0 auto !important;
        max-width: none !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar__split {
        width: auto !important;
        display: inline-flex !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-paystub-toolbar__btn--primary-caret {
        flex: 0 0 40px !important;
        width: auto !important;
        min-width: 40px !important;
        max-width: none !important;
    }
}

/* ================================================================
   USA ONLY — mobile + tablet earnings/deductions compact cards (≤1023)
   Desktop six-column table untouched. Same field nodes; grid placement
   is applied by public/user/js/psx-usa-earn-mobile-layout.js
   Density pass: tight cards, compact deduction rows, summary blocks.
   ================================================================ */
@media (max-width: 1023.98px) {
    /* Helper under DEDUCTIONS — secondary, not competing with the heading */
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-lock-hint {
        margin: 4px 0 10px !important;
        padding: 0 !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        line-height: 1.35 !important;
        color: #64748b !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-cols-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        column-gap: 8px !important;
        row-gap: 6px !important;
        align-items: start !important;
        width: 100% !important;
        margin: 0 !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-cols-row > [class*='col-'] {
        display: contents !important;
        width: auto !important;
        max-width: none !important;
        flex: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile.psx-salary-earnings:not(.psx-salary-earnings-addons) .psx-earn-col-rate,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile.psx-salary-earnings:not(.psx-salary-earnings-addons) .psx-earn-col-hours {
        display: none !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-cols-row #addEarning,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-cols-row #addRate,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-cols-row #addHours,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-cols-row #addTotal,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-cols-row #addGrossTotal,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-cols-row #addYtdTotal {
        display: contents !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-cols-row > [class*='col-'] > .statementbtn,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-cols-row > [class*='col-'] > .margin-bottom > .statementbtn,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-cols-row .psx-col-sub,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-cols-row > [class*='col-'] > .margin-bottom > p {
        display: none !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-cols-row > [class*='col-'] > .margin-bottom:has(> .statementbtn):not(:has(input.earnbtn, select.earnbtn, select.psx-earning-sel)) {
        display: none !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-cell {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        align-items: stretch !important;
        justify-self: stretch !important;
        box-sizing: border-box !important;
    }

    /* Addon cells must match Regular cells — kill desktop flex banding */
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-cols-row .psx-earn-addon-cell,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-cell.psx-earn-addon-cell {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        margin-bottom: 0 !important;
        align-items: stretch !important;
        flex: none !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-cell[data-psx-mobile-label]::before {
        content: attr(data-psx-mobile-label);
        display: block;
        margin: 0 0 3px;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: #64748b;
        line-height: 1.15;
    }

    /* Light card chrome — denser than v1 */
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-name {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px;
        margin-top: 2px !important;
        padding: 8px 8px 0 !important;
        border: 1px solid #e8edf2;
        border-bottom: none;
        border-radius: 8px 8px 0 0;
        background: #fcfdfe;
    }

    /* Visible Select Type (+ custom name when unlocked) — never force-show .d-none presets */
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-name > .earnbtn:not(.d-none),
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-name > select.earnbtn:not(.d-none),
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-name > select.psx-earning-sel:not(.d-none) {
        font-weight: 700 !important;
        font-size: 14px !important;
        text-align: left !important;
        margin: 0 !important;
        min-height: 38px !important;
        height: 38px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Same as desktop: tax-classification / custom name stay hidden until Custom is chosen */
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-cell .earnbtn.d-none,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-name .psx-earning-custom.d-none,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-name .psx-earning-custom-preset.d-none,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-name .psx-ot-custom-base.d-none,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-name .psx-ot-controls.d-none {
        display: none !important;
    }

    /* Calc method sits above Rate/Hours grid, full card width — slight gap under Select Type */
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-name .psx-calc-method {
        width: 100% !important;
        max-width: 100% !important;
        margin: 10px 0 4px !important;
        flex: 0 0 auto !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-name .psx-ot-controls:not(.d-none) {
        width: 100% !important;
        margin: 0 0 4px !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-rate,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-hours,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-total,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-period {
        padding: 0 8px !important;
        border-left: 1px solid #e8edf2;
        border-right: 1px solid #e8edf2;
        background: #fcfdfe;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-rate,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-total {
        padding-left: 8px !important;
        border-right: none !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-hours,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-period {
        padding-right: 8px !important;
        border-left: none !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-ytd {
        margin-bottom: 8px !important;
        padding: 0 8px 8px !important;
        border: 1px solid #e8edf2;
        border-top: none;
        border-radius: 0 0 8px 8px;
        background: #fcfdfe;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-cell .earnbtn:not(.d-none),
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-cell .psx-earn-field-wrap,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-cell .psx-rate-with-explain {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        min-height: 38px !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-cell .psx-rate-with-explain > input.earnbtn,
    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-usa-m-earn-cell .psx-earn-field-wrap > input.earnbtn {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 38px !important;
        height: 38px !important;
        box-sizing: border-box !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa.psx-usa-earn-mobile .psx-earn-addon-cell {
        min-height: 0 !important;
        height: auto !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .row:has(> [class*='col-'] > #add_earning),
    #submit_form_paystubx_id.psx-paystub-form--usa .row:has(> [class*='col-'] > .add_deduction) {
        margin-top: 6px !important;
        margin-bottom: 10px !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .add_button.earnbtn,
    #submit_form_paystubx_id.psx-paystub-form--usa .add_deduction.earnbtn {
        min-height: 40px !important;
        padding: 8px 12px !important;
        font-size: 14px !important;
    }

    /* ---- Deductions: tight payroll rows (not giant form cards) ---- */
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row.psx-deduction-row,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(> [class*='col-'] > input.taxes),
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(> [class*='col-'] > input[name='tax_deduction[]']),
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-grid-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        column-gap: 8px !important;
        row-gap: 10px !important;
        align-items: start !important;
        width: 100% !important;
        margin: 0 0 6px !important;
        padding: 8px !important;
        border: 1px solid #e8edf2 !important;
        border-radius: 8px !important;
        background: #fff !important;
        box-sizing: border-box !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row > [class*='col-'],
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(> [class*='col-'] > input.taxes) > [class*='col-'],
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(> [class*='col-'] > input[name='tax_deduction[]']) > [class*='col-'],
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-grid-row > [class*='col-'] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(> [class*='col-'] > input.taxes) > .col-md-1,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(> [class*='col-'] > input.taxes) > .col-lg-1,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(> [class*='col-'] > input[name='tax_deduction[]']) > .col-md-1,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(> [class*='col-'] > input[name='tax_deduction[]']) > .col-lg-1,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(> [class*='col-'] > input.taxes) > .col-md-2.col-lg-3:not(.mb-3),
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(> [class*='col-'] > input[name='tax_deduction[]']) > .col-md-2.col-lg-3:not(.mb-3) {
        display: none !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row > .col-md-8,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row > .col-lg-8,
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-grid-row > .col-md-8,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(> [class*='col-'] > input.taxes) > .col-md-4,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(> [class*='col-'] > input.taxes) > .col-lg-3,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(> [class*='col-'] > input[name='tax_deduction[]']) > .col-md-4,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(> [class*='col-'] > input[name='tax_deduction[]']) > .col-lg-3 {
        grid-column: 1 / -1 !important;
        position: relative !important;
        margin-bottom: 2px !important;
    }

    /* Professional lock gap: icon near left edge of cell, text clear of icon */
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row > .col-md-8 > .psx-lock-icon,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row > .col-lg-8 > .psx-lock-icon,
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-grid-row > .col-md-8 > .psx-lock-icon {
        position: absolute !important;
        left: 8px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
        z-index: 3 !important;
        font-size: 14px !important;
        width: 16px !important;
        text-align: center !important;
        pointer-events: auto !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row input.taxes.earnbtn,
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-grid-row input.taxes.earnbtn,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(input.taxes) input.taxes.earnbtn {
        padding: 8px 10px 8px 40px !important;
        text-align: left !important;
        min-height: 38px !important;
        height: 38px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Edit image-lock rows: keep a clear gap */
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa .col-md-4.col-lg-3.mb-3:has(> .psx-lock-icon) > .psx-lock-icon,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa .col-md-4.col-lg-3.mb-3:has(> img.earnbtn2) > img.earnbtn2 {
        margin-right: 10px !important;
        flex-shrink: 0 !important;
    }
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa .col-md-4.col-lg-3.mb-3:has(> .psx-lock-icon) > input.earnbtn,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa .col-md-4.col-lg-3.mb-3:has(> img.earnbtn2) > input.earnbtn {
        padding-left: 8px !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row > .col-md-2.mb-3:nth-of-type(2)::before,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row > .col-lg-2.mb-3:nth-of-type(2)::before,
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-grid-row > .col-md-2.mb-3:nth-of-type(2)::before,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(input.taxes) > .col-md-2.mb-3:nth-last-child(2)::before,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(input[name='tax_deduction[]']) > .col-md-2.mb-3:nth-last-child(2)::before {
        content: 'THIS PERIOD';
        display: block;
        margin: 0 0 2px;
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: #64748b;
        line-height: 1.15;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row > .col-md-2.mb-3:nth-of-type(3)::before,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row > .col-lg-2.mb-3:nth-of-type(3)::before,
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-grid-row > .col-md-2.mb-3:nth-of-type(3)::before,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(input.taxes) > .col-md-2.mb-3:last-child::before,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(input[name='tax_deduction[]']) > .col-md-2.mb-3:last-child::before {
        content: 'YTD';
        display: block;
        margin: 0 0 2px;
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: #64748b;
        line-height: 1.15;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row .earnbtn:not(.psx-deduction-percentage):not(.psx-deduction-sel),
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-grid-row .earnbtn:not(.psx-deduction-percentage):not(.psx-deduction-sel),
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(input.taxes) .manualTaxTotal,
    #submit_form_paystubx_id.psx-paystub-form--usa .box-usa > .row:has(input[name='tax_deduction[]']) .earnbtn:not(.psx-deduction-percentage):not(.psx-deduction-sel) {
        width: 100% !important;
        margin: 0 !important;
        min-height: 36px !important;
        height: 36px !important;
        box-sizing: border-box !important;
    }

    /* Added deductions: Select Type only (centered). Calc method = segmented control. */
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row:has(.psx-deduction-sel) > .col-md-8,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row:has(.psx-deduction-sel) > .col-lg-8,
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-grid-row > .col-md-8,
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-grid-row > .col-lg-8 {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    /*
     * Select Type — text MUST be vertically centered.
     * Do not use line-height == height with border-box (border eats height → text sinks).
     */
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row select.psx-deduction-sel.earnbtn,
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-grid-row select.psx-deduction-sel.earnbtn,
    #submit_form_paystubx_id.psx-paystub-form--usa select.psx-deduction-sel {
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        margin: 0 !important;
        /* Equal top/bottom padding centers the label; right pad clears custom chevron */
        padding: 10px 36px 10px 12px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        text-align: left !important;
        vertical-align: middle !important;
        box-sizing: border-box !important;
        background-color: #ffffff !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23475569' d='M1.41 0L6 4.58 10.59 0 12 1.41 6 7.41 0 1.41z'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 12px center !important;
        background-size: 12px 8px !important;
        box-shadow: inset 0 1px 2px rgba(255,255,255,0.85), 0 1px 2px rgba(0,0,0,0.06) !important;
        border: 1.5px solid #C0C0C0 !important;
        border-radius: 2px !important;
        color: #1a2e3b !important;
    }

    /* Space under Select Type → Calculation Method segment (like earnings) */
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row .psx-deduction-calc-method,
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-calc-method {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 4px !important;
        flex: 0 0 auto !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row .psx-deduction-calc-method .psx-calc-method__btn,
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-calc-method .psx-calc-method__btn {
        min-height: 38px !important;
        font-size: 11px !important;
        padding: 6px 5px !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row .psx-deduction-custom.d-none,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row .psx-deduction-custom-preset.d-none,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row .psx-deduction-percentage.d-none,
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-grid-row .earnbtn.d-none {
        display: none !important;
    }

    /* % of cash gross — gap under segment + placeholder text vertically centered */
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row .psx-deduction-custom:not(.d-none),
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row .psx-deduction-custom-preset:not(.d-none),
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row input.psx-deduction-percentage.earnbtn:not(.d-none),
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-grid-row input.psx-deduction-percentage.earnbtn:not(.d-none) {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        /* Same centering pattern as Select Type — equal top/bottom padding */
        padding: 10px 12px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        text-align: left !important;
        vertical-align: middle !important;
        box-sizing: border-box !important;
        flex: 0 0 auto !important;
    }

    /* Hard gap: segment + % field must never sit flush */
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-calc-method:has(+ input.psx-deduction-percentage:not(.d-none)),
    #submit_form_paystubx_id.psx-paystub-form--usa #add_deduction .psx-deduction-calc-method:has(+ input.psx-deduction-percentage:not(.d-none)) {
        padding-bottom: 12px !important;
        margin-bottom: 0 !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .createbtn {
        border-radius: 8px !important;
        min-height: 40px !important;
        margin-bottom: 0 !important;
    }

    /* ---- Taxes & Deductions summary (compact) ---- */
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        column-gap: 8px !important;
        row-gap: 4px !important;
        align-items: end !important;
        margin: 10px 0 8px !important;
        padding: 8px !important;
        border: 1px solid #e8edf2 !important;
        border-radius: 8px !important;
        background: #f8fafc !important;
        box-sizing: border-box !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) > [class*='col-'] {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) > .col-md-8,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) > .col-lg-8 {
        grid-column: 1 / -1 !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) .psx-taxes-summary-label,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) input[type='button'].earnbtn {
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 0 0 4px !important;
        margin: 0 !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #0b1f4d !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        letter-spacing: 0.02em !important;
        text-align: left !important;
        cursor: default !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row .psx-col-sub {
        position: static !important;
        height: auto !important;
        display: block !important;
        margin: 0 0 2px !important;
        padding: 0 !important;
        font-family: inherit !important;
        font-size: 9px !important;
        font-weight: 700 !important;
        letter-spacing: 0.05em !important;
        text-transform: uppercase !important;
        color: #64748b !important;
        text-align: left !important;
        line-height: 1.15 !important;
        pointer-events: none !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) > .col-md-2:nth-of-type(2) .psx-col-sub,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) > .col-lg-2:nth-of-type(2) .psx-col-sub {
        font-size: 0 !important;
    }
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) > .col-md-2:nth-of-type(2) .psx-col-sub::before,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) > .col-lg-2:nth-of-type(2) .psx-col-sub::before {
        content: 'THIS PERIOD';
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.05em;
    }
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) > .col-md-2:nth-of-type(3) .psx-col-sub,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) > .col-lg-2:nth-of-type(3) .psx-col-sub {
        font-size: 0 !important;
    }
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) > .col-md-2:nth-of-type(3) .psx-col-sub::before,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row:not(.psx-summary-netpay-row) > .col-lg-2:nth-of-type(3) .psx-col-sub::before {
        content: 'YTD';
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.05em;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row .deduction_tax,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row .ytd_deduction_tax,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row .total_net_pay,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row .total_ytd_net_pay {
        width: 100% !important;
        min-height: 38px !important;
        height: 38px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-calc-note {
        margin: 8px 0 !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
    }

    /* ---- Net Pay: one strong concluding summary ---- */
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        column-gap: 8px !important;
        row-gap: 6px !important;
        align-items: stretch !important;
        justify-items: stretch !important;
        margin: 8px 0 4px !important;
        padding: 8px !important;
        border: 1px solid #c7d2e0 !important;
        border-radius: 8px !important;
        background: #f1f5f9 !important;
        box-sizing: border-box !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row > [class*='col-'] {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row > .col-md-8,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row > .col-lg-8 {
        grid-column: 1 / -1 !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row .netpaybtn,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row .net_pay {
        width: 100% !important;
        min-height: 40px !important;
        height: 40px !important;
        margin: 0 !important;
        padding: 0 12px !important;
        border-radius: 6px !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        letter-spacing: 0.06em !important;
        text-transform: uppercase !important;
    }

    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row > .col-md-2:nth-of-type(2) .psx-col-sub,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row > .col-lg-2:nth-of-type(2) .psx-col-sub {
        font-size: 0 !important;
    }
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row > .col-md-2:nth-of-type(2) .psx-col-sub::before,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row > .col-lg-2:nth-of-type(2) .psx-col-sub::before {
        content: 'THIS PERIOD';
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.05em;
    }
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row > .col-md-2:nth-of-type(3) .psx-col-sub,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row > .col-lg-2:nth-of-type(3) .psx-col-sub {
        font-size: 0 !important;
    }
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row > .col-md-2:nth-of-type(3) .psx-col-sub::before,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row > .col-lg-2:nth-of-type(3) .psx-col-sub::before {
        content: 'YTD';
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.05em;
    }

    /* Net Pay THIS PERIOD / YTD — beat .col-md-2.col-lg-2.mb-3 { width:50% } */
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row > .col-md-2.col-lg-2.mb-3 {
        grid-column: auto !important;
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        justify-self: stretch !important;
    }
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row input.earnbtn.total_net_pay,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row input.earnbtn.total_ytd_net_pay {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Kill leftover Bootstrap mb-3 / mt-5 stretch inside USA summary + deduction rows */
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-deduction-grid-row .mb-3,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-grid-row .mb-3,
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row .mb-3 {
        margin-bottom: 0 !important;
    }
    #submit_form_paystubx_id.psx-paystub-form--usa .psx-summary-netpay-row.mt-5 {
        margin-top: 8px !important;
    }
}

/* ================================================================
   MOBILE/TABLET SITE HEADER — single source of truth (≤900px).
   Flex row on __inner (64px). Brand + burger stretch full height and
   center their contents. No grid, no display:contents, no duplicates.
   ================================================================ */
@media (max-width: 900px) {
    header.site-header {
        height: 64px !important;
        min-height: 64px !important;
        max-height: 64px !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    header.site-header .site-header__inner {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        justify-content: space-between !important;
        height: 64px !important;
        min-height: 64px !important;
        max-height: 64px !important;
        width: 100% !important;
        max-width: 1500px !important;
        margin: 0 auto !important;
        padding: 0 12px 0 16px !important;
        box-sizing: border-box !important;
        gap: 0 !important;
    }
    header.site-header .site-header__nav,
    header.site-header .site-header__auth,
    header.site-header .psx-cube-scene {
        display: none !important;
    }
    header.site-header .site-header__brand,
    header.site-header .psx-brand-cluster {
        flex: 0 1 auto !important;
        display: flex !important;
        align-items: center !important;
        align-self: stretch !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        min-width: 0 !important;
        position: static !important;
        transform: none !important;
    }
    header.site-header .site-header__logo {
        display: flex !important;
        align-items: center !important;
        align-self: stretch !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 0 !important;
    }
    header.site-header .site-header__logo img {
        display: block !important;
        height: 34px !important;
        width: auto !important;
        max-width: 172px !important;
        margin: 0 !important;
        padding: 0 !important;
        object-fit: contain !important;
        /* Logo PNG has extra transparent space above the letters */
        transform: translateY(4px) !important;
    }
    header.site-header .site-header__burger {
        flex: 0 0 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        align-self: stretch !important;
        width: 48px !important;
        height: auto !important;
        margin: 0 0 0 8px !important;
        padding: 0 !important;
        position: static !important;
        top: auto !important;
        right: auto !important;
        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        color: #0b1726 !important;
        line-height: 0 !important;
        -webkit-tap-highlight-color: transparent;
        z-index: 1301 !important;
        /* Kill UA/default button chrome — the “black wrap” around the icon */
        border: none !important;
        border-width: 0 !important;
        outline: none !important;
        box-shadow: none !important;
        background: transparent !important;
        background-color: transparent !important;
        background-image: none !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        border-radius: 0 !important;
    }
    header.site-header .site-header__burger:focus,
    header.site-header .site-header__burger:active,
    header.site-header .site-header__burger:hover {
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }
    header.site-header .site-header__burger:focus-visible {
        outline: 2px solid #0b1726 !important;
        outline-offset: 2px !important;
        border-radius: 8px !important;
    }
    header.site-header .site-header__burger[aria-expanded="true"] {
        color: #0b1726 !important;
    }
    header.site-header .site-header__burger-icon {
        display: block !important;
        width: 32px !important;
        height: 32px !important;
        stroke: currentColor !important;
        stroke-width: 3.25 !important;
        fill: none !important;
    }
}

/* Logged-in sidenav name pill: kill newstyle .dropbtn white + Bootstrap fill. */
#mySidenav.sidenav .sidenav__auth .dropbtn,
#mySidenav.sidenav .sidenav__auth .sidenav__user-menu {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}
#mySidenav.sidenav .sidenav__auth button.sidenav__user-btn,
#mySidenav.sidenav .sidenav__auth button.authUserName,
#mySidenav.sidenav .sidenav__auth .btn.sidenav__user-btn,
#mySidenav.sidenav .sidenav__auth .btn-default.authUserName {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(255,255,255,0.28) !important;
    box-shadow: none !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    max-width: 100% !important;
    font-size: 17px !important;
}
