/* =============================================================================
   ff-mobile-affin.css  — v3
   Target : ALL mobile devices 360px → 767px
            iPhone SE (375px) → iPhone 16 Pro Max (440px)
            Samsung S21 (360px) → S24 Ultra (412px)
            Tablets in portrait / foldables (up to 767px)
            Vivo · Xiaomi · Oppo · Redmi · Poco · Realme
            Nothing Phone · Huawei / HarmonyOS

   v2 refinements (CIMB benchmark)
   ───────────────────────────────────────────────────────────────────
   • Labels: neutral grey (#666) at rest, AFFIN blue on focus-within
   • Inputs: lighter surface (#f0f0f0) + blue bottom-border on focus
   • Field gap: 18–24px (was 14–20px) — more breathing room
   • Headings: bolder weight, larger size — page titles read as headings
   • Error state: red bottom border (consistent with focus pattern)
   ───────────────────────────────────────────────────────────────────
   Section map
   ───────────────────────────────────────────────────────────────────
   1   Design tokens & CSS custom properties
   2   Base resets — OEM browser defence
   3   Viewport & document shell
   4   Progress bar / step indicator
   5   Form container & single-column layout
   6   Labels
   7   Text inputs & textarea
   8   Chosen.js select overrides
   9   Phone prefix input group
   10  Radio & checkbox
   11  Section headers (collapsible accordions)
   12  Headings
   13  Validation & help text
   14  Fixed bottom navigation
   15  Modals (PDF · email · eKYC · success)
   16  System / hidden fields
   17  Bug fixes (Issues 1–4)
   18  480px refinement pass
   19  360px floor pass
   ───────────────────────────────────────────────────────────────────
   ============================================================================= */


/* =============================================================================
   1 — DESIGN TOKENS
   Centralise every value so tweaks need one edit, not twenty.
   ============================================================================= */
:root {
    /* Brand */
    --affin-blue: #0768b3;
    --affin-blue-dark: #055a99;
    --affin-blue-light: #e8f1fb;
    /* Neutral surface */
    --surface-input: #e8e8e8;
    --surface-input-dis: #e0e0e0;
    --surface-nav: #ffffff;
    /* Text */
    --text-primary: #111111;
    --text-secondary: #333333;
    --text-muted: #888888;
    --text-placeholder: #aaaaaa;
    --text-label: #444444; /* darker grey for legibility on white inputs */
    --text-label-focus: #0768b3; /* AFFIN blue on focus/active */
    --text-error: #e74c3c;
    /* Borders */
    --border-nav: #eeeeee;
    --border-input-err: #e74c3c;
    --border-input: #d0d0d0; /* subtle border for lighter input style */
    --border-input-focus: #0768b3; /* AFFIN blue focus ring */
    /* Spacing — fluid from 360px to 767px */
    --page-h-pad: clamp(14px, 3.5vw, 32px);
    --form-bottom-pad: 0px;
    --field-gap: clamp(20px, 4vw, 36px); /* breathing room between fields */
    /* Typography — SINGLE knob for every blue section/page title on mobile
       (page titles, sub-section headings, work-background headings,
       summary accordion headers). Change this one value to resize them all. */
    --mobile-title-size: clamp(17px, 4.6vw, 22px);
    /* Components */
    --radius-input: 10px;
    --radius-btn: 10px;
    --radius-modal: 14px;
    /* Touch targets — Apple HIG 44px, Material 48px, we use 48px */
    --touch-min: 48px;
    /* Bottom nav safe area — covers iOS notch/Dynamic Island,
       Android gesture bar, Vivo/Oppo/Huawei variants.
       max() guarantees minimum padding even if OS reports 0 */
    --safe-bottom: max(20px, env(safe-area-inset-bottom));
    --safe-left: max(0px, env(safe-area-inset-left));
    --safe-right: max(0px, env(safe-area-inset-right));
    /* Nav height — used by body padding-top to prevent content hiding under fixed header */
    --nav-height: clamp(76px, 12vw, 100px);
    /* Bottom nav panel height — used for body bottom padding */
    --bottom-nav-height: clamp(90px, 16vw, 130px);
    /* Progress bar */
    --progress-circle: clamp(26px, 5vw, 42px);
    --progress-label-fs: clamp(7px, 1.6vw, 12px);
    --progress-line-top: clamp(12px, 2.8vw, 20px);
    /* Transition */
    --transition-fast: 0.2s ease;
    --transition-std: 0.25s ease;
}


/* =============================================================================
   2 — BASE RESETS — OEM BROWSER DEFENCE
   Applied outside @media so they fire on ALL widths below 768px
   when the stylesheet is loaded with the media attribute.
   ============================================================================= */

/* Prevent OEM font-boost (Xiaomi MIUI, Oppo ColorOS, Realme UI, Vivo FuntouchOS)
   from inflating text and breaking layout */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Tell OEM browsers this page manages its own color scheme.
       Blocks Oppo/Vivo/Xiaomi HyperOS from injecting dark-mode
       background overrides into the webview. */
    color-scheme: light;
}

/* Mirror on body for older OEM WebView implementations */
body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    color-scheme: light;
    /* Disable forced dark mode on Xiaomi HyperOS + Samsung One UI */
    forced-color-adjust: none;
}

/* Remove grey tap flash on Android OEM browsers (Xiaomi, Oppo, Vivo, Samsung) */
a,
button,
input,
select,
textarea,
label,
[role="button"] {
    -webkit-tap-highlight-color: transparent;
}

    /* Eliminate 300ms tap delay on older Android (pre-Chrome 55, OEM browsers) */
    a,
    button,
    input[type="submit"],
    input[type="button"],
    [role="button"] {
        touch-action: manipulation;
    }

/* Box-sizing baseline — ensures padding doesn't cause overflow on narrow viewports */
*,
*::before,
*::after {
    box-sizing: border-box;
}


/* =============================================================================
   3 — VIEWPORT & DOCUMENT SHELL
   ============================================================================= */
@media screen and (max-width: 768px) {

    body.mobile-device {
        background-color: #ffffff !important;
        padding-top: var(--nav-height) !important;
        /* Account for fixed bottom nav panel */
        padding-bottom: 0 !important;
        /* Prevent horizontal scroll caused by overflowing form builder columns */
        overflow-x: hidden !important;
        /* Dynamic viewport height — prevents 100vh overflow on Android Chrome
           when URL bar is visible. Fallback for browsers without dvh support. */
        min-height: 100vh;
        min-height: 100dvh;
        /* Smooth momentum scrolling on iOS, smooth behaviour on Android */
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        /* Affin brand font stack — covers iOS (SF Pro), Android (Roboto),
           HarmonyOS (HarmonyOS Sans), Vivo/Oppo/Xiaomi system fonts,
           Nothing Phone (Roboto), Samsung (Samsung One) */
        font-family: -apple-system, BlinkMacSystemFont, "HarmonyOS Sans", "Noto Sans", Roboto, "Samsung One", "Open Sans", sans-serif !important;
    }

        /* Constrain the outer column wrapper — no overflow */
        body.mobile-device .col-lg-12 {
            padding-left: 0 !important;
            padding-right: 0 !important;
            overflow-x: hidden !important;
            width: 100% !important;
            max-width: 100% !important;
        }

        /* Kill all horizontal overflow at every level */
        body.mobile-device,
        body.mobile-device .col-lg-12,
        body.mobile-device form#processresults,
        body.mobile-device #buildform {
            overflow-x: hidden !important;
            max-width: 100vw !important;
            margin: 0 auto;
        }
}
/* end §3 */


/* =============================================================================
   4 — PROGRESS BAR / STEP INDICATOR
   ============================================================================= */
@media screen and (max-width: 768px) {

    body.mobile-device .progress-bar-container {
        padding: clamp(10px, 2vw, 16px) var(--page-h-pad) clamp(8px, 1.8vw, 14px) !important;
        box-sizing: border-box !important;
        width: 100% !important;
        background: #ffffff !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08) !important;
    }

    /* Connector lines */
    body.mobile-device .progress-bar-line-bg,
    body.mobile-device .progress-bar-line-fill {
        top: var(--progress-line-top) !important;
        height: 2px !important;
    }

    /* Step container — flex, evenly spaced */
    body.mobile-device .progress-steps-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 0 !important;
        width: 100% !important;
    }

    /* Individual step */
    body.mobile-device .progress-step {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: clamp(4px, 1vw, 8px) !important;
        flex: 1 !important;
        min-width: 0 !important;
    }

    /* Circle — fluid size, never clips at 360px */
    body.mobile-device .progress-circle {
        width: var(--progress-circle) !important;
        height: var(--progress-circle) !important;
        min-width: var(--progress-circle) !important;
        font-size: clamp(11px, 2.8vw, 16px) !important;
        line-height: var(--progress-circle) !important;
        flex-shrink: 0 !important;
        /* Ensure crisp rendering at 3× DPR */
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
    }

    /* Label below circle */
    body.mobile-device .progress-label {
        font-size: var(--progress-label-fs) !important;
        white-space: normal !important;
        max-width: clamp(44px, 11vw, 72px) !important;
        line-height: 1.25 !important;
        text-align: center !important;
        word-break: break-word !important;
        /* Prevent OEM font-boost overriding this small text */
        -webkit-text-size-adjust: none !important;
        text-size-adjust: none !important;
    }
}
/* end §4 */


/* =============================================================================
   5 — FORM CONTAINER & SINGLE-COLUMN LAYOUT
   ============================================================================= */
@media screen and (max-width: 768px) {

    form#processresults {
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Form builder output container */
    #buildform {
        padding: 0 !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

        /* ── Single-column: belt-and-suspenders approach ──────────────────
       ff-main-affin.css defines col-sm-6 / col-md-6 inside
       @media (min-width:768px) blocks. We need to be MORE specific
       AND load after that file. We use both the attribute selector
       AND the explicit class names to cover every possible case.
    ─────────────────────────────────────────────────────────────────── */

        /* OVERRIDE CSS GRID — block layout, single column */
        #buildform .rendered-form {
            display: block !important;
            grid-template-columns: none !important;
            grid-template-rows: none !important;
            grid-column: unset !important;
            grid-row: unset !important;
            gap: 0 !important;
            width: 100% !important;
            max-width: 100% !important;
        }

            /* Force every grid child back to full-width block */
            #buildform .rendered-form > div,
            #buildform .rendered-form > div[class] {
                display: block !important;
                grid-column: unset !important;
                grid-row: unset !important;
                width: 100% !important;
                max-width: 100% !important;
            }

    /* Hint text */
    .rendered-form:has(.h1-learn-more-abt-you) > div:has(p) {
        font-style: italic !important;
        color: var(--text-muted) !important;
        font-size: clamp(11px, 2.2vw, 14px) !important;
        margin-top: 4px !important;
        margin-bottom: 4px !important;
    }

    /* Employment Status + Occupation — force single column
       ff-main-affin.css places them at grid-column:1 and grid-column:2 same row.
       CSS must override this — JS cannot strip CSS-set grid-column. */
    .rendered-form:has(.h1-learn-more-abt-you) .field-EMSTATUS,
    .rendered-form:has(.h1-learn-more-abt-you) .field-OCCUPATION,
    #buildform .field-EMSTATUS,
    #buildform .field-OCCUPATION {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        display: block !important;
    }

    /* Every descendant div */
    #buildform .rendered-form div {
        max-width: 100% !important;
        float: none !important;
        clear: both !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Explicit col-*-6 overrides — matching same specificity as main CSS */
    #buildform .col-xs-1, #buildform .col-sm-1, #buildform .col-md-1, #buildform .col-lg-1,
    #buildform .col-xs-2, #buildform .col-sm-2, #buildform .col-md-2, #buildform .col-lg-2,
    #buildform .col-xs-3, #buildform .col-sm-3, #buildform .col-md-3, #buildform .col-lg-3,
    #buildform .col-xs-4, #buildform .col-sm-4, #buildform .col-md-4, #buildform .col-lg-4,
    #buildform .col-xs-5, #buildform .col-sm-5, #buildform .col-md-5, #buildform .col-lg-5,
    #buildform .col-xs-6, #buildform .col-sm-6, #buildform .col-md-6, #buildform .col-lg-6,
    #buildform .col-xs-7, #buildform .col-sm-7, #buildform .col-md-7, #buildform .col-lg-7,
    #buildform .col-xs-8, #buildform .col-sm-8, #buildform .col-md-8, #buildform .col-lg-8,
    #buildform .col-xs-9, #buildform .col-sm-9, #buildform .col-md-9, #buildform .col-lg-9,
    #buildform .col-xs-10, #buildform .col-sm-10, #buildform .col-md-10, #buildform .col-lg-10,
    #buildform .col-xs-11, #buildform .col-sm-11, #buildform .col-md-11, #buildform .col-lg-11,
    #buildform .col-xs-12, #buildform .col-sm-12, #buildform .col-md-12, #buildform .col-lg-12 {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        float: none !important;
        clear: both !important;
        flex: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Attribute selector fallback for any col- variant not listed above */
    #buildform [class*="col-"] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        clear: both !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Bootstrap row reset */
    #buildform .row,
    #buildform .form-row {
        display: block !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    /* fb- prefixed field wrappers */
    #buildform [class^="fb-"],
    #buildform [class*=" fb-"] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        clear: both !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Consistent font across all form elements */
    #buildform,
    #buildform * {
        font-family: -apple-system, BlinkMacSystemFont, "HarmonyOS Sans", "Noto Sans", Roboto, "Samsung One", sans-serif !important;
    }

        /* Form group spacing — breathing room */
        #buildform .form-group {
            width: 100% !important;
            margin-bottom: clamp(14px, 3vw, 28px) !important;
            display: block !important;
            box-sizing: border-box !important;
        }

            /* Last field — minimal gap before nav */
            #buildform .form-group:last-child,
            #buildform .fb-checkbox-group:last-child,
            #buildform .rendered-form > div:last-child {
                margin-bottom: 8px !important;
            }

    /* Hide .form-navigation-integrated — duplicate nav from form-handler.js
       No body.mobile-device scope — fires immediately from media query */
    .form-navigation-integrated {
        display: none !important;
    }

    /* Hide stray inline buttons inside #buildform */
    body.mobile-device #buildform .btn.btn-primary,
    body.mobile-device #buildform .btn.btn-default,
    body.mobile-device #buildform .btn.btn-success,
    body.mobile-device .button-group,
    body.mobile-device .flex-form-footer {
        display: none !important;
    }

    /* Override ff-main-affin.css: #tabNavigation { display:none }
       Use both scoped and unscoped to ensure it wins */
    #tabNavigation,
    .tab-navigation,
    body.mobile-device #tabNavigation,
    body.mobile-device .tab-navigation {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* FIX LEFT ALIGNMENT + text wrapping */
    body.mobile-device .flex-form-footer,
    body.mobile-device form.m-t,
    body.mobile-device form#processresults,
    body.mobile-device #buildform,
    body.mobile-device #buildform div,
    body.mobile-device #buildform .form-group,
    body.mobile-device #buildform .rendered-form,
    body.mobile-device #buildform .rendered-form > div,
    body.mobile-device #buildform input,
    body.mobile-device #buildform select,
    body.mobile-device #buildform textarea,
    body.mobile-device #buildform label,
    body.mobile-device #buildform p,
    body.mobile-device #buildform span {
        text-align: left !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

        /* Fix clipped text — full wrap, visible overflow.
           Unprefixed selectors too: body.mobile-device is UA-sniffed and can be
           absent — the @media wrapper is the real mobile gate (Mobile UIUX2) */
        #buildform p,
        #buildform .rendered-form > div > p,
        #buildform .form-group > p,
        body.mobile-device #buildform p,
        body.mobile-device #buildform .rendered-form > div > p,
        body.mobile-device #buildform .form-group > p {
            white-space: normal !important;
            word-wrap: break-word !important;
            overflow-wrap: break-word !important;
            max-width: 100% !important;
            overflow: visible !important;
            display: block !important;
        }

    /* Pin to left — no Bootstrap centering, no scope dependency */
    .col-lg-12,
    body.mobile-device .col-lg-12,
    form#processresults,
    body.mobile-device form#processresults,
    form.m-t,
    body.mobile-device form.m-t {
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        position: static !important;
    }

    /* Single source of padding — #buildform only */
    #buildform,
    body.mobile-device #buildform {
        padding-left: var(--page-h-pad) !important;
        padding-right: var(--page-h-pad) !important;
        overflow-x: visible !important;
        box-sizing: border-box !important;
    }
}
/* end §5 */


/* =============================================================================
   6 — LABELS
   ============================================================================= */
@media screen and (max-width: 768px) {

    /* Field labels — single line, never wrap.
       EXCLUDE .fb-checkbox-group-label: it's the multi-line consent/statement
       paragraph (e.g. declaration page), not a compact field-title label —
       `#buildform .form-group label` (1,1,1) otherwise beats its own block/
       wrap rule further down (1,1,0), forcing the paragraph onto one nowrap
       line and pushing its trailing .fb-required "*" into its own column. */
    #buildform label:not(.fb-checkbox-group-label),
    #buildform .form-group label:not(.fb-checkbox-group-label) {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 3px !important;
        overflow: visible !important;
        white-space: nowrap !important;
        color: var(--text-label) !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        margin-bottom: 6px !important;
        line-height: 1.2 !important;
        transition: color 0.2s ease !important;
        -webkit-text-size-adjust: none !important;
        text-size-adjust: none !important;
        /* Prevent grid/flex parent from squishing the label */
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    /* Question labels (radio-group titles like "Is your mailing address the
       same as your MyKad / MyTentera address?") — wrap to the next line when
       wider than the column (Mobile UIUX2). Field-title labels above stay
       single-line. */
    #buildform label.fb-radio-group-label,
    #buildform .form-group label.fb-radio-group-label {
        white-space: normal !important;
        flex-wrap: wrap !important;
        overflow-wrap: break-word !important;
    }

    /* Keep required asterisk on the same line as question text, not on new row.
       Change to block display and let text/asterisk flow naturally as inline elements. */
    #buildform label.fb-radio-group-label,
    #buildform .form-group label.fb-radio-group-label {
        display: block !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }

    #buildform label.fb-radio-group-label .fb-required,
    #buildform label.fb-radio-group-label .required,
    #buildform .form-group label.fb-radio-group-label .fb-required,
    #buildform .form-group label.fb-radio-group-label .required {
        display: inline !important;
        white-space: nowrap !important;
        margin-left: 2px !important;
    }

    /* Label turns AFFIN blue when its sibling input is focused.
       EXCLUDE: .fb-checkbox-group-label (the "I consent to Affin Bank..." paragraph)
       — ff-main-affin.css sets it to #888888; our focus-within was overriding it blue.
       EXCLUDE: .form-check-label and checkbox-row labels — those are item labels,
       not field-title labels, and must not go blue. */
    #buildform .form-group:focus-within label:not(.fb-checkbox-group-label):not(.form-check-label):not(.checkbox-label),
    #buildform .form-group:focus-within .form-group label:not(.fb-checkbox-group-label):not(.form-check-label) {
        color: var(--text-label-focus) !important;
    }

    /* HARD LOCK — fb-checkbox-group-label stays #888888 in ALL states.
       This element contains the consent paragraph text and must NEVER turn blue.
       ff-main-affin.css: line 3571 sets it #888888 — we preserve that exactly. */
    #buildform .fb-checkbox-group-label,
    #buildform .form-group:focus-within .fb-checkbox-group-label,
    #buildform .field-CONSENT .fb-checkbox-group-label,
    #buildform .form-group:has(input[type="checkbox"]:checked) .fb-checkbox-group-label,
    #buildform .form-group:has(input[type="checkbox"]:focus) .fb-checkbox-group-label {
        color: #888888 !important;
        -webkit-text-fill-color: #888888 !important;
        font-weight: 600 !important;
        white-space: normal !important;
        /* display:block (not flex) so the trailing .fb-required "*" flows as
           normal inline text at the end of the paragraph, instead of being
           a separate flex item that wraps onto its own row. */
        display: block !important;
    }

        /* The trailing "*" sits inside this same label as an inline span —
       keep it inline so it rides along at the end of the paragraph text. */
        #buildform .fb-checkbox-group-label .fb-required {
            display: inline !important;
        }

    /* ── GROUP-STATEMENT PARAGRAPH — full-width block in ALL states ─────────
       Bug (declaration image 3 / consent reflow): the correct full-width block
       layout for the consent/declaration statement paragraph only "turned on"
       once a checkbox was checked, via the :has(input:checked) selector above
       (1,4,1). With NOTHING checked, the rest-state selector
       `#buildform .fb-checkbox-group-label` (1,1,0) lost to the item-label rule
       `#buildform .fb-checkbox-group label` (1,2,1) further down — so the
       paragraph collapsed to a narrow flex layout and its trailing "*" detached
       to the right. Ticking a box then made it snap to full width (the text
       "moving on tick" the user reported). This rule reasserts the block layout
       UNCONDITIONALLY at (1,3,0) — beats (1,2,1), no :checked dependency — so
       the paragraph is identical before and after ticking. Mobile-only; PC (not
       gated by this media query) is unaffected.
       Second selector (doubled class) is a specificity-only fallback: it reaches
       (1,3,0) using just .rendered-form + the label's own class, so the fix still
       lands if the .fb-checkbox-group wrapper class is ever absent. */
    #buildform .rendered-form .fb-checkbox-group .fb-checkbox-group-label,
    #buildform .rendered-form .fb-checkbox-group-label.fb-checkbox-group-label {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        float: none !important;
        white-space: normal !important;
        text-align: left !important;
        font-weight: 600 !important;
        color: #888888 !important;
        -webkit-text-fill-color: #888888 !important;
    }

        /* Required "*" — inline at the end of the paragraph, ALWAYS red.
           The parent label's -webkit-text-fill-color:#888888 inherits into the
           span and overrides its red `color`, so the "*" rendered grey; setting
           the fill colour red too is what actually makes it red. */
        #buildform .rendered-form .fb-checkbox-group .fb-checkbox-group-label .fb-required,
        #buildform .rendered-form .fb-checkbox-group-label.fb-checkbox-group-label .fb-required {
            display: inline !important;
            color: var(--text-error) !important;
            -webkit-text-fill-color: var(--text-error) !important;
            white-space: nowrap !important;
            margin-left: 2px !important;
            font-weight: inherit !important;
        }

    /* Required asterisk / abbr — stays inline, never wraps */
    #buildform .form-group label .required,
    #buildform .form-group label span[class*="required"],
    #buildform .form-group label abbr {
        display: inline !important;
        white-space: nowrap !important;
        margin-left: 2px !important;
        color: var(--text-error) !important;
        font-size: inherit !important;
        line-height: inherit !important;
    }

    /* Radio / checkbox group labels — allow wrap, dimmer colour */
    #buildform .form-check label,
    #buildform .checkbox-item label,
    #buildform .radio-item label,
    #buildform .fb-radio label,
    #buildform .checkbox-group label {
        white-space: normal !important;
        color: var(--text-muted) !important;
        font-size: clamp(12px, 2.4vw, 16px) !important;
        margin: 0 !important;
        font-weight: 400 !important;
    }

    /* Issue 4 fix — hide Mobius Checking label exposed to end users */
    .fb-mobius_checking > label,
    .fb-mobius_checking .field-label,
    label[for*="mobius_checking"],
    .fb-mobius_checking .control-label {
        display: none !important;
    }
}
/* end §6 */


/* =============================================================================
   7 — TEXT INPUTS & TEXTAREA
   All inputs must be ≥ 16px to prevent iOS Safari viewport zoom on focus.
   This is the single most impactful rule for iPhone users.
   ============================================================================= */
@media screen and (max-width: 768px) {

    /* Standard text / number / email / date inputs */
    #buildform input:not([type="radio"]):not([type="checkbox"]):not([type="file"]) {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: var(--touch-min) !important;
        /* White background — clean card-style inputs */
        background-color: #ffffff !important;
        border: 1px solid var(--border-input) !important;
        border-bottom: 2px solid var(--border-input) !important;
        border-radius: var(--radius-input) !important;
        box-shadow: none !important;
        outline: none !important;
        /* Typography — 16px floor prevents iOS zoom */
        font-size: 16px !important;
        font-family: inherit !important;
        line-height: 1.4 !important;
        color: var(--text-primary) !important;
        -webkit-text-fill-color: var(--text-primary) !important;
        opacity: 1 !important;
        /* Layout */
        padding: clamp(11px, 2.2vw, 16px) clamp(12px, 2.5vw, 20px) !important;
        float: none !important;
        box-sizing: border-box !important;
        /* Suppress OEM autofill yellow background (Xiaomi / Samsung) */
        -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
        /* Remove iOS/Android native appearance */
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        /* Smooth focus transition — bottom border colour change */
        transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast) !important;
    }

        /* Focus — AFFIN blue border all round, white fill */
        #buildform input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):focus {
            background-color: #ffffff !important;
            border-color: var(--border-input-focus) !important;
            border-bottom-color: var(--border-input-focus) !important;
            -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
            box-shadow: 0 0 0 2px rgba(7,104,179,0.15) !important;
            outline: none !important;
        }

    /* Readonly / disabled — slightly tinted to signal non-editable.
       Single shared recipe: inputs, selects, textareas and the
       .ff-readonly-display class applied by JS lockers all use this.
       The input selectors repeat the base recipe's :not() chain so they
       OUTRANK the white base rule above — both are !important, so
       specificity decides (1,4,1 vs 1,3,1). Without the chain, locked
       text inputs stay white while locked selects go grey. */
    #buildform input[readonly]:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
    #buildform input[disabled]:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
    #buildform input.ff-readonly-display:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
    #buildform select[readonly],
    #buildform select[disabled],
    #buildform textarea[readonly],
    #buildform textarea[disabled],
    #buildform select.ff-readonly-display,
    #buildform textarea.ff-readonly-display {
        background-color: #f5f5f5 !important;
        border-color: #e0e0e0 !important;
        color: var(--text-secondary) !important;
        -webkit-text-fill-color: var(--text-secondary) !important;
        opacity: 1 !important;
        cursor: not-allowed !important;
        -webkit-box-shadow: 0 0 0 1000px #f5f5f5 inset !important;
    }

    /* Date inputs — iOS WebKit centres the value inside its shadow part
       once -webkit-appearance:none is applied; force left alignment */
    #buildform input[type="date"] {
        text-align: left !important;
    }

        #buildform input[type="date"]::-webkit-date-and-time-value {
            text-align: left !important;
            margin: 0 !important;
        }

    /* Placeholder */
    #buildform input::placeholder,
    #buildform textarea::placeholder {
        color: var(--text-placeholder) !important;
        -webkit-text-fill-color: var(--text-placeholder) !important;
        opacity: 1 !important;
    }

    /* Textarea */
    #buildform textarea {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: clamp(80px, 14vw, 120px) !important;
        background-color: #ffffff !important;
        border: 1px solid var(--border-input) !important;
        border-bottom: 2px solid var(--border-input) !important;
        border-radius: var(--radius-input) !important;
        box-shadow: none !important;
        outline: none !important;
        font-size: 16px !important;
        font-family: inherit !important;
        line-height: 1.5 !important;
        color: var(--text-primary) !important;
        -webkit-text-fill-color: var(--text-primary) !important;
        opacity: 1 !important;
        padding: clamp(11px, 2.2vw, 16px) clamp(12px, 2.5vw, 20px) !important;
        box-sizing: border-box !important;
        white-space: pre-wrap !important;
        resize: vertical !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        transition: background-color var(--transition-fast), border-color var(--transition-fast) !important;
    }

        #buildform textarea:focus {
            background-color: #ffffff !important;
            border-color: var(--border-input-focus) !important;
            border-bottom-color: var(--border-input-focus) !important;
            -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
            box-shadow: 0 0 0 2px rgba(7,104,179,0.15) !important;
            outline: none !important;
        }

        /* Validation error state — red bottom border matches focus style */
        #buildform input.error-field,
        #buildform textarea.error-field,
        #buildform .error-field input,
        #buildform .error-field textarea {
            background-color: #fef0f0 !important;
            border-bottom-color: var(--text-error) !important;
            -webkit-box-shadow: 0 0 0 1000px #fef0f0 inset !important;
            box-shadow: none !important;
            border-top: none !important;
            border-left: none !important;
            border-right: none !important;
        }
}
/* end §7 */


/* =============================================================================
   8 — CHOSEN.JS SELECT OVERRIDES
   NOTE: Never apply display:none to the native <select> —
   Chosen reads it to build its dropdown. Chosen hides it itself.
   ============================================================================= */
@media screen and (max-width: 768px) {

    /* Outer wrapper — stretch full width */
    #buildform .chosen-container,
    #buildform .chosen-container-single,
    #buildform .chosen-container-multi {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        float: none !important;
        clear: both !important;
        box-sizing: border-box !important;
        /* Must stay visible — .chosen-drop is position:absolute below the
           button inside this container; overflow:hidden clips the open
           dropdown panel entirely so no options ever appear */
        overflow: visible !important;
    }

        /* Visible selector button — white surface, bordered to match inputs */
        #buildform .chosen-container-single .chosen-single,
        #buildform .chosen-container .chosen-single {
            display: block !important;
            width: 100% !important;
            min-height: var(--touch-min) !important;
            height: auto !important;
            line-height: var(--touch-min) !important;
            background: #ffffff !important;
            background-image: none !important;
            border: 1px solid var(--border-input) !important;
            border-bottom: 2px solid var(--border-input) !important;
            border-radius: var(--radius-input) !important;
            box-shadow: none !important;
            padding: 0 clamp(32px, 6vw, 48px) 0 clamp(12px, 2.5vw, 20px) !important;
            box-sizing: border-box !important;
            font-size: 16px !important;
            color: var(--text-primary) !important;
            -webkit-text-fill-color: var(--text-primary) !important;
            overflow: hidden !important;
            white-space: nowrap !important;
            text-overflow: ellipsis !important;
            -webkit-appearance: none !important;
            -moz-appearance: none !important;
        }

            /* Selected text span */
            #buildform .chosen-container-single .chosen-single span,
            #buildform .chosen-container .chosen-single span {
                display: block !important;
                line-height: var(--touch-min) !important;
                overflow: hidden !important;
                text-overflow: ellipsis !important;
                white-space: nowrap !important;
                margin-right: clamp(20px, 4vw, 36px) !important;
                color: var(--text-primary) !important;
            }

        /* Placeholder text */
        #buildform .chosen-container .chosen-default span {
            color: var(--text-placeholder) !important;
        }

        /* Dropdown arrow area */
        #buildform .chosen-container-single .chosen-single div,
        #buildform .chosen-container .chosen-single div {
            position: absolute !important;
            right: 0 !important;
            top: 0 !important;
            width: clamp(36px, 6.5vw, 52px) !important;
            height: 100% !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
        }

            #buildform .chosen-container-single .chosen-single div b,
            #buildform .chosen-container .chosen-single div b {
                /* Replace chosen's sprite arrow with a CSS chevron */
                background: none !important;
                width: 10px !important;
                height: 10px !important;
                border-right: 2px solid #666 !important;
                border-bottom: 2px solid #666 !important;
                transform: rotate(45deg) translateY(-3px) !important;
                display: block !important;
            }

        /* Dropdown panel */
        #buildform .chosen-container .chosen-drop {
            width: 100% !important;
            border: 1px solid #d0d0d0 !important;
            border-radius: 0 0 var(--radius-input) var(--radius-input) !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
            background: #fff !important;
            z-index: 9999 !important;
            left: 0 !important;
            /* Momentum scroll on iOS */
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch !important;
            overscroll-behavior: contain !important;
            max-height: clamp(200px, 38vw, 320px) !important;
        }

        /* Search box inside dropdown */
        #buildform .chosen-container .chosen-search input[type="text"] {
            width: 100% !important;
            border: 1px solid #ddd !important;
            border-radius: 6px !important;
            padding: clamp(8px, 1.6vw, 12px) clamp(10px, 2.2vw, 16px) !important;
            font-size: 16px !important;
            color: var(--text-primary) !important;
            background: #fff !important;
            box-sizing: border-box !important;
            -webkit-appearance: none !important;
        }

        /* Dropdown result items — generous tap target */
        #buildform .chosen-container .chosen-results li {
            padding: clamp(10px, 2vw, 15px) clamp(12px, 2.5vw, 20px) !important;
            font-size: 16px !important;
            color: var(--text-primary) !important;
            line-height: 1.4 !important;
            white-space: normal !important;
            min-height: var(--touch-min) !important;
            display: flex !important;
            align-items: center !important;
        }

            /* Highlighted / active option */
            #buildform .chosen-container .chosen-results li.highlighted {
                background-color: var(--affin-blue) !important;
                background-image: none !important;
                color: #fff !important;
            }
}
/* end §8 */


/* =============================================================================
   8b — NATIVE <select> BASELINE
   Plain selects (not wrapped by chosen.js) previously fell back to the
   desktop .form-control look (34px, 4px radius, #ccc border) and looked
   different from text inputs. Mirror the §7 input recipe so every field
   shares the same stroke, size and colour.
   NOTE: chosen.js hides its wrapped selects with a plain INLINE display:none
   (no class added) — display here must stay non-!important so that inline
   hide wins, otherwise every chosen-wrapped select pops back up as a
   duplicate control under the chosen widget.
   ============================================================================= */
@media screen and (max-width: 768px) {

    #buildform select {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        min-height: var(--touch-min) !important;
        height: auto !important;
        background-color: #ffffff !important;
        border: 1px solid var(--border-input) !important;
        border-bottom: 2px solid var(--border-input) !important;
        border-radius: var(--radius-input) !important;
        box-shadow: none !important;
        outline: none !important;
        font-size: 16px !important;
        font-family: inherit !important;
        line-height: 1.4 !important;
        color: var(--text-primary) !important;
        opacity: 1 !important;
        padding: clamp(11px, 2.2vw, 16px) clamp(32px, 6vw, 48px) clamp(11px, 2.2vw, 16px) clamp(12px, 2.5vw, 20px) !important;
        float: none !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        /* CSS chevron to replace the stripped native arrow */
        background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23666666' stroke-width='2'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right clamp(12px, 2.5vw, 20px) center !important;
        background-size: 12px 8px !important;
        transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast) !important;
    }

        #buildform select:focus {
            background-color: #ffffff !important;
            border-color: var(--border-input-focus) !important;
            border-bottom-color: var(--border-input-focus) !important;
            box-shadow: 0 0 0 2px rgba(7,104,179,0.15) !important;
            outline: none !important;
        }
}
/* end §8b */


/* =============================================================================
   9 — PHONE PREFIX INPUT GROUP (+60)
   ============================================================================= */
@media screen and (max-width: 768px) {

    #buildform .input-group {
        display: flex !important;
        width: 100% !important;
        background-color: #ffffff !important;
        border-radius: var(--radius-input) !important;
        overflow: hidden !important;
        border: 1px solid var(--border-input) !important;
        border-bottom: 2px solid var(--border-input) !important;
        box-shadow: none !important;
        min-height: var(--touch-min) !important;
        align-items: center !important;
    }

    #buildform .input-group-addon {
        display: flex !important;
        align-items: center !important;
        background-color: transparent !important;
        color: var(--text-primary) !important;
        -webkit-text-fill-color: var(--text-primary) !important;
        font-weight: 400 !important;
        font-size: 16px !important;
        padding: 0 4px 0 clamp(12px, 2.5vw, 20px) !important;
        border: none !important;
        flex-shrink: 0 !important;
        width: auto !important;
        white-space: nowrap !important;
        border-radius: 0 !important;
    }

    /* Input inside group — no extra border, seamless */
    #buildform .input-group input:not([type="radio"]):not([type="checkbox"]) {
        flex: 1 !important;
        width: auto !important;
        min-width: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        padding-left: 4px !important;
        -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    }
}
/* end §9 */


/* =============================================================================
   10 — RADIO & CHECKBOX
   ─────────────────────────────────────────────────────────────────────────────
   COORDINATION WITH ff-main-affin.css:
   ff-main-affin.css (lines 3583-3662) defines a complete custom checkbox system
   for .h1-learn-more-abt-you (Step 1) using:
     • input[type="checkbox"]: hidden (opacity:0, width:0, height:0)
     • label::before: the visible box (white bg, grey border, 20×20px)
     • input:checked + label::before: blue bg (#32599F)
     • input:checked + label::after: white ✓ checkmark (content:"✓")
     • .fb-checkbox-group-label: colour #888888 (the consent paragraph)
     • .fb-checkbox label: colour #888888 (individual checkbox labels)

   Our mobile CSS must NOT break this system. We provide:
     • Layout fixes (flex, padding, overflow) — no colour overrides on fb-checkbox
     • A hard lock preventing the §6 focus-within rule from colouring
       fb-checkbox-group-label blue (the root cause of the reported bug)
     • Bootstrap .checkbox (non-consent checkboxes) gets our own ::before box
   ============================================================================= */
@media screen and (max-width: 768px) {

    /* ── HIDE NATIVE CHECKBOX INPUT (Bootstrap fix) ─────────────────
       Bootstrap positions it at absolute/margin-left:-20px which breaks layout.
       ff-main-affin.css already hides it for .fb-checkbox — we mirror for
       Bootstrap's .checkbox wrapper as a safety net.                          */
    #buildform .checkbox input[type="checkbox"],
    #buildform .checkbox-inline input[type="checkbox"] {
        position: absolute !important;
        opacity: 0 !important;
        width: 1px !important;
        height: 1px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        clip: rect(0,0,0,0) !important;
        pointer-events: none !important;
    }

    /* ── .fb-checkbox LAYOUT — do NOT override ff-main-affin.css colours ──
       ff-main-affin.css sets label colour to #888888 — we preserve that.
       We only fix layout properties (display, padding, position, overflow).   */
    #buildform .fb-checkbox {
        display: flex !important;
        align-items: flex-start !important;
        overflow: visible !important;
        padding-left: 0 !important;
    }

        /* The .form-group variant matches §6's (1,2,1) specificity —
           `#buildform .form-group label:not(.fb-checkbox-group-label)` —
           so item labels wrap to the next line instead of inheriting its
           nowrap (Mobile UIUX2: second consent option was cut off). */
        #buildform .fb-checkbox label,
        #buildform .form-group .fb-checkbox label {
            display: flex !important;
            align-items: flex-start !important;
            cursor: pointer !important;
            font-size: clamp(13px, 2.5vw, 17px) !important;
            line-height: 1.5 !important;
            /* colour intentionally NOT set here — ff-main-affin.css owns it (#888888) */
            margin: 0 !important;
            padding: 0 !important;
            white-space: normal !important;
            position: relative !important; /* CRITICAL for ::after checkmark */
            font-weight: 400 !important;
            overflow: visible !important;
            flex: 1 !important;
        }

        /* HARD LOCK: .fb-checkbox label and .fb-checkbox-group-label must NEVER
       go blue from our §6 focus-within rule or any other source.
       ff-main-affin.css uses #888888 for both — we enforce that here.         */
        #buildform .fb-checkbox label,
        #buildform .fb-checkbox-group-label,
        #buildform .form-group:focus-within .fb-checkbox label,
        #buildform .form-group:focus-within .fb-checkbox-group-label,
        #buildform .field-CONSENT .fb-checkbox label,
        #buildform .field-CONSENT .fb-checkbox-group-label,
        body.mobile-device #buildform:has(input[type="checkbox"]:checked) .fb-checkbox label,
        body.mobile-device #buildform:has(input[type="checkbox"]:checked) .fb-checkbox-group-label,
        body.mobile-device #buildform *:focus-within .fb-checkbox label,
        body.mobile-device #buildform *:focus-within .fb-checkbox-group-label {
            color: #888888 !important;
            -webkit-text-fill-color: #888888 !important;
        }

            /* ── .fb-checkbox ::before / ::after — DEFER TO ff-main-affin.css ──────
       ff-main-affin.css defines the full custom checkbox box and tick via
       label::before (box) and input:checked + label::after (✓ tick).
       We must NOT override these with content:none or different backgrounds.
       Only ensure the ::before box is sized correctly for mobile touch targets. */
            #buildform .fb-checkbox label::before {
                width: 22px !important;
                height: 22px !important;
                min-width: 22px !important;
                margin-right: 12px !important;
                margin-top: 1px !important;
                flex-shrink: 0 !important;
                box-sizing: border-box !important;
                /* background, border, border-radius owned by ff-main-affin.css */
            }

    /* Declaration page uses input[type="checkbox"] itself for box styling
       (ff-main-affin.css lines 5060-5095). Suppress our label::before there. */
    .rendered-form:has(.h1-declaration) #buildform .fb-checkbox label::before,
    body.mobile-device #buildform .rendered-form:has(.h1-declaration) .fb-checkbox label::before {
        content: none !important;
        display: none !important;
    }

    /* ── Checked tick — painted INSIDE the ::before box ────────────────────
       ff-main-affin.css draws the tick as an absolutely-positioned "✓" glyph
       (label::after, top:0.2px). On mobile that breaks twice:
         1. Our tap-target rule (`input[type="checkbox"] + label`, §10 below)
            adds vertical padding to the label — the ::before box moves down
            with the padding but the absolute glyph stays pinned at the
            label's top edge, so the tick floats above the box.
         2. The #888888 -webkit-text-fill-color hard-lock above inherits into
            the ::after glyph and overrides its white colour — grey tick.
       Fix: paint a white SVG tick as the checked box's own background
       (always centred, font-independent) and suppress the glyph on mobile.
       The Declaration page is unaffected: its label::before is content:none
       (rule above) and its tick lives on input::after, not label::after.    */
    #buildform .fb-checkbox input[type="checkbox"]:checked + label::before {
        background-color: #32599F !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M5 11.5l4 4L17 7.5' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: center center !important;
        background-size: 16px 16px !important;
    }

    #buildform .fb-checkbox input[type="checkbox"]:checked + label::after {
        content: none !important;
    }

    /* ── Bootstrap .checkbox (non-fb-checkbox) — our own custom box ────────
       For checkboxes NOT inside .fb-checkbox (e.g. generic Bootstrap checkboxes
       elsewhere in the form), we draw our own ::before box since ff-main-affin.css
       does not provide custom styling for these.                               */
    /* .form-group variant matches §6's (1,2,1) specificity so these labels
       wrap instead of inheriting its nowrap (see .fb-checkbox note above) */
    #buildform .checkbox label,
    #buildform .form-group .checkbox label {
        display: flex !important;
        align-items: flex-start !important;
        cursor: pointer !important;
        font-size: clamp(13px, 2.5vw, 17px) !important;
        line-height: 1.5 !important;
        color: #444444 !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: normal !important;
        position: relative !important;
        font-weight: 400 !important;
        overflow: visible !important;
    }

        #buildform .checkbox label::before {
            content: "" !important;
            display: block !important;
            flex-shrink: 0 !important;
            width: 22px !important;
            height: 22px !important;
            min-width: 22px !important;
            background: #ffffff !important;
            border: 2px solid #adb5bd !important;
            border-radius: 5px !important;
            margin-right: 12px !important;
            margin-top: 1px !important;
            transition: background 0.15s, border-color 0.15s !important;
            box-sizing: border-box !important;
        }

    #buildform .checkbox input[type="checkbox"]:checked + label::before,
    #buildform .checkbox input[type="checkbox"]:checked ~ label::before {
        background-color: #ffffff !important;
        border-color: #555555 !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M4 11l4.5 4.5L18 7' stroke='%23333333' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: center center !important;
        background-size: 18px 18px !important;
    }

    /* Wrapper overflow fix */
    #buildform .checkbox,
    #buildform .form-check {
        padding-left: 2px !important;
        overflow: visible !important;
    }

    /* ── RADIO — accent-color, native but tinted ─────────────────── */
    #buildform input[type="radio"] {
        -webkit-appearance: radio !important;
        -moz-appearance: radio !important;
        appearance: radio !important;
        accent-color: #0768b3 !important;
        position: relative !important;
        opacity: 1 !important;
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        margin: 2px 10px 0 0 !important;
        float: none !important;
        clip: auto !important;
        overflow: visible !important;
        pointer-events: auto !important;
    }

    /* Checkbox row */
    #buildform .form-check,
    #buildform .checkbox,
    #buildform .checkbox-group,
    #buildform .checkbox-group .form-group,
    #buildform .fb-checkbox-group .form-check {
        display: block !important;
        padding: 4px 0 !important;
        cursor: pointer !important;
        width: 100% !important;
        box-sizing: border-box !important;
        grid-column: unset !important;
        grid-row: unset !important;
        min-height: auto !important;
    }

    /* Checkbox group container — also override grid */
    #buildform .fb-checkbox-group,
    #buildform .checkbox-group {
        display: block !important;
        width: 100% !important;
        grid-column: unset !important;
        grid-row: unset !important;
    }

        /* Checkbox label — takes remaining space, wraps properly */
        #buildform .form-check-label,
        #buildform .checkbox-group label,
        #buildform .fb-checkbox-group label {
            flex: 1 !important;
            margin: 0 !important;
            padding: 0 !important;
            font-size: clamp(13px, 2.5vw, 17px) !important;
            line-height: 1.5 !important;
            cursor: pointer !important;
            text-align: left !important;
            color: var(--text-secondary) !important;
            white-space: normal !important;
        }

        /* Wrapper row — flex with adequate tap zone */
        #buildform .form-check,
        #buildform .checkbox-item,
        #buildform .radio-item,
        #buildform .fb-radio,
        #buildform .checkbox-group .form-group {
            display: flex !important;
            align-items: center !important;
            gap: clamp(8px, 1.8vw, 14px) !important;
            min-height: var(--touch-min) !important;
            margin-bottom: clamp(8px, 1.6vw, 14px) !important;
            width: 100% !important;
            cursor: pointer !important;
        }

    /* Radio group — generous vertical gap between options */
    #buildform .fb-radio-group {
        gap: clamp(16px, 3.2vw, 30px) !important;
    }

    /* Mailing address same as MyKad — Yes/No inline, close together, left-anchored.
       ff-main-affin.css (.h1-dont-miss-this-step) already centres these via
       justify-content:center on .field-MAILINGOPTION. On mobile we keep them
       centred via the field container but make the pair appear tight.
       The .radio-group is the actual class ff-main-affin.css uses (not .fb-radio-group). */
    #buildform .field-MAILINGOPTION .radio-group,
    #buildform [class*="MAILINGOPTION"] .radio-group {
        display: flex !important;
        flex-direction: row !important;
        gap: 12px !important;
        align-items: center !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }

    #buildform .field-MAILINGOPTION .fb-radio,
    #buildform [class*="MAILINGOPTION"] .fb-radio {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
        width: auto !important;
        flex: 0 0 auto !important;
    }

    /* Also handle fb-radio-group variant */
    #buildform .field-MAILINGOPTION .fb-radio-group,
    #buildform [class*="MAILINGOPTION"] .fb-radio-group,
    #buildform .field-mailing-same .fb-radio-group {
        display: flex !important;
        flex-direction: row !important;
        gap: 12px !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        flex-wrap: wrap !important;
    }

    #buildform .field-MAILINGOPTION .radio-item,
    #buildform [class*="MAILINGOPTION"] .radio-item,
    #buildform .field-mailing-same .radio-item {
        width: auto !important;
        min-height: 44px !important;
        margin-bottom: 0 !important;
        flex: 0 0 auto !important;
    }

    /* Catch-all: whatever wrapper formRender emits around each Yes/No radio
       must never be stretched to 100% width — a full-width wrapper inside the
       flex row pushes the "No" option past the viewport edge (untappable) */
    #buildform .field-MAILINGOPTION .radio-group > div,
    #buildform .field-MAILINGOPTION .fb-radio-group > div,
    #buildform [class*="MAILINGOPTION"] .radio-group > div,
    #buildform [class*="MAILINGOPTION"] .fb-radio-group > div {
        display: inline-flex !important;
        align-items: center !important;
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
    }

    /* Compact section spacing — cancels the desktop padding-top:2.5em from
       ff-main-affin.css so the question sits close to the fields around it */
    #buildform .field-MAILINGOPTION {
        padding-top: 8px !important;
        padding-bottom: 0 !important;
        margin-bottom: 12px !important;
        gap: 12px !important;
    }

    /* Declaration page checkbox group special spacing */
    #buildform .fb-radio-group {
        gap: clamp(16px, 3.5vw, 28px) !important;
    }

    /* ── Consent / PDPA checkbox block ────────────────────────────
       The "I consent to AFFIN..." paragraph + checkboxes below it.
       Styled as a distinct card-like block so it reads separately
       from the form fields above it.
    ──────────────────────────────────────────────────────────────── */

    /* Consent paragraph — HARD LOCK on dark colour.
       The formbuilder CSS applies colour to p/paragraph elements when a sibling
       checkbox is checked (via :has(input:checked) or :focus-within on the parent).
       We must override ALL of those states with maximum specificity.
       Rule covers: at rest, :hover, :focus-within parent, :has(checked) parent.  */

    /* Base rule — any p inside buildform */
    body.mobile-device #buildform p,
    body.mobile-device #buildform .fb-paragraph p,
    body.mobile-device #buildform .fb-header p,
    body.mobile-device #buildform .fb-paragraph,
    body.mobile-device #buildform .fb-header > div > p,
    body.mobile-device #buildform [class*="pdpa"] p,
    body.mobile-device #buildform [class*="consent"] p,
    body.mobile-device #buildform .field-pdpa-text p {
        color: #333333 !important;
        -webkit-text-fill-color: #333333 !important;
        font-size: clamp(12px, 2.2vw, 15px) !important;
        line-height: 1.65 !important;
        font-style: normal !important;
        text-align: left !important;
    }

    /* Override when PARENT has a checked checkbox (:has selector) */
    body.mobile-device #buildform:has(input[type="checkbox"]:checked) p,
    body.mobile-device #buildform:has(input[type="checkbox"]:checked) .fb-paragraph p,
    body.mobile-device #buildform:has(input[type="checkbox"]:checked) .fb-header p {
        color: #333333 !important;
        -webkit-text-fill-color: #333333 !important;
    }

    /* Override :focus-within on any ancestor */
    body.mobile-device #buildform *:focus-within p,
    body.mobile-device #buildform .form-group:focus-within ~ .fb-paragraph p,
    body.mobile-device #buildform .form-group:focus-within ~ .fb-header p,
    body.mobile-device #buildform .rendered-form:focus-within p,
    body.mobile-device #buildform .rendered-form:focus-within .fb-paragraph p {
        color: #333333 !important;
        -webkit-text-fill-color: #333333 !important;
    }

    /* Checkbox item wrapper — 44px min tap target */
    #buildform .checkbox-group .checkbox,
    #buildform .fb-checkbox-group .checkbox,
    #buildform .checkbox-group .form-group,
    #buildform input[type="checkbox"] + label,
    #buildform .form-check {
        min-height: 44px !important;
        display: flex !important;
        align-items: flex-start !important;
        gap: clamp(10px, 2vw, 18px) !important;
        padding: clamp(8px, 1.8vw, 14px) 0 !important;
        cursor: pointer !important;
        width: 100% !important;
    }

    /* Checkbox input itself — fixed size, not affected by §7 */
    #buildform input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        margin-top: 2px !important;
        flex-shrink: 0 !important;
        cursor: pointer !important;
    }

    /* Checkbox label text */
    #buildform .checkbox-group label,
    #buildform .fb-checkbox-group label,
    #buildform .form-check label {
        font-size: clamp(13px, 2.4vw, 16px) !important;
        color: var(--text-secondary) !important;
        line-height: 1.6 !important;
        white-space: normal !important;
        cursor: pointer !important;
        margin: 0 !important;
        flex: 1 !important;
        font-weight: 400 !important;
    }
}
/* end §10 */


/* =============================================================================
   11 — SECTION HEADERS (collapsible accordion rows)
   ============================================================================= */
@media screen and (max-width: 768px) {

    /* Header row */
    body.mobile-device .rendered-form > div:has(.h4-personal-info-final),
    body.mobile-device .rendered-form > div:has(.h4-address-info-final),
    body.mobile-device .rendered-form > div:has(.h4-employment-info-final) {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        padding: clamp(10px, 2vw, 18px) 0 !important;
        cursor: pointer !important;
        box-sizing: border-box !important;
    }

    /* Section title text */
    .h4-personal-info-final,
    .h4-address-info-final,
    .h4-employment-info-final {
        font-size: clamp(13px, 2.6vw, 16px) !important;
        font-weight: 500 !important;
        color: var(--affin-blue) !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.4 !important;
        flex: 1 !important;
    }

    /* Toggle button — outlined circle */
    body.mobile-device .rendered-form > div:has(.h4-personal-info-final) button,
    body.mobile-device .rendered-form > div:has(.h4-address-info-final) button,
    body.mobile-device .rendered-form > div:has(.h4-employment-info-final) button {
        background: transparent !important;
        background-color: transparent !important;
        background-image: none !important;
        border: 2px solid var(--affin-blue) !important;
        border-radius: 50% !important;
        box-shadow: none !important;
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        padding: 0 !important;
        color: transparent !important;
        font-size: 0 !important;
        margin-left: auto !important;
        flex-shrink: 0 !important;
        cursor: pointer !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

        /* Hide any icon/text child nodes inside button */
        body.mobile-device .rendered-form > div:has(.h4-personal-info-final) button *,
        body.mobile-device .rendered-form > div:has(.h4-address-info-final) button *,
        body.mobile-device .rendered-form > div:has(.h4-employment-info-final) button * {
            display: none !important;
        }

        /* CSS chevron ↓ drawn via ::after */
        body.mobile-device .rendered-form > div:has(.h4-personal-info-final) button::after,
        body.mobile-device .rendered-form > div:has(.h4-address-info-final) button::after,
        body.mobile-device .rendered-form > div:has(.h4-employment-info-final) button::after {
            content: '' !important;
            display: block !important;
            width: 7px !important;
            height: 7px !important;
            border-right: 2px solid var(--affin-blue) !important;
            border-bottom: 2px solid var(--affin-blue) !important;
            transform: rotate(45deg) translateY(-2px) !important;
            transition: transform var(--transition-std) !important;
            flex-shrink: 0 !important;
        }

    /* Collapsed state — chevron points right → */
    body.mobile-device .rendered-form > div:has(.h4-personal-info-final.collapsed) button::after,
    body.mobile-device .rendered-form > div:has(.h4-address-info-final.collapsed) button::after,
    body.mobile-device .rendered-form > div:has(.h4-employment-info-final.collapsed) button::after {
        transform: rotate(-45deg) translateY(0) !important;
    }
}
/* end §11 */


/* =============================================================================
   12 — HEADINGS
   clamp() scales headings proportionally across 360–767px without breakpoints
   ============================================================================= */
@media screen and (max-width: 768px) {

    /* Heading scale — left aligned, scoped to #buildform */
    #buildform h1 {
        font-size: clamp(20px, 3.8vw, 28px) !important;
        text-align: left !important;
    }

    #buildform h2 {
        font-size: clamp(18px, 3.4vw, 26px) !important;
        text-align: left !important;
    }

    #buildform h3 {
        font-size: clamp(16px, 3vw, 22px) !important;
        text-align: left !important;
    }

    #buildform h4 {
        font-size: clamp(14px, 2.8vw, 20px) !important;
        text-align: left !important;
    }

    #buildform h5 {
        font-size: clamp(13px, 2.5vw, 17px) !important;
        text-align: left !important;
    }

    /* Step intro title — left, bold; wraps to the next line when longer
       than the viewport (Mobile UIUX2 — was one-line ellipsis) */
    #buildform > h3,
    #buildform > h4,
    #buildform .step-intro-title,
    #buildform .form-page-title {
        text-align: left !important;
        margin-bottom: clamp(16px, 3.2vw, 30px) !important;
        margin-top: clamp(4px, 1.2vw, 10px) !important;
        padding: 0 !important;
        font-weight: 600 !important;
        color: var(--text-primary) !important;
        font-size: clamp(15px, 3.5vw, 20px) !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        overflow: visible !important;
        overflow-wrap: break-word !important;
    }

    /* Page title headings inside rendered-form — wrap to the next line when
       longer than the viewport (Mobile UIUX2 — was one-line ellipsis).
       Targets: "Perfect! Let's start…", "Step 3 – Almost there…",
                "Final checkpoint!…", "Let us know your mailing address",
                "Don't miss this step, validate your address" etc.
       CENTRE ALIGNED as per design requirement. */
    #buildform .rendered-form > div:first-child h3,
    #buildform .rendered-form > div:first-child h4,
    #buildform .rendered-form > div:first-child .h1-learn-more-abt-you,
    #buildform .rendered-form > div:first-child [class^="h1-"],
    #buildform .rendered-form > div:first-child [class*=" h1-"] {
        font-size: var(--mobile-title-size) !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        overflow: visible !important;
        overflow-wrap: break-word !important;
        width: 100% !important;
        display: block !important;
        text-align: center !important;
        color: var(--affin-blue) !important;
    }

    /* Sub-section headings (e.g. "Let us know your mailing address") — also centred */
    #buildform .rendered-form [class^="h2-"],
    #buildform .rendered-form [class*=" h2-"],
    #buildform .rendered-form [class^="h3-"],
    #buildform .rendered-form [class*=" h3-"],
    #buildform .rendered-form .h3-mailing-address,
    #buildform .rendered-form .header-work-background,
    #buildform .rendered-form .fb-header h3,
    #buildform .rendered-form .fb-header h4 {
        text-align: center !important;
        color: var(--affin-blue) !important;
        font-weight: 600 !important;
        font-size: var(--mobile-title-size) !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
    }

        /* Page title inside header-work-background — centre the h3/h4 inside it */
        #buildform .rendered-form > div:has(.header-work-background) h3,
        #buildform .rendered-form > div:has(.header-work-background) h4,
        #buildform .rendered-form .header-work-background h3,
        #buildform .rendered-form .header-work-background h4 {
            text-align: center !important;
            color: var(--affin-blue) !important;
            font-weight: 700 !important;
            font-size: var(--mobile-title-size) !important;
            white-space: normal !important;
            overflow: visible !important;
            overflow-wrap: break-word !important;
        }

    /* The <hr> that follows the title */
    #buildform > hr {
        margin: 0 0 clamp(12px, 2.5vw, 22px) !important;
    }

    /* Declaration heading — centred. Definitive rule is in §20 with higher specificity.
       Kept here only as a fallback for non-mobile-device class pages. */
    #buildform .h1-declaration,
    .h1-declaration {
        text-align: center !important;
        font-size: clamp(22px, 4vw, 30px) !important;
        font-weight: 700 !important;
        color: #000000 !important;
    }

    /* All other section headings — LEFT, AFFIN blue.
       NOTE: Declaration override must come AFTER this in §20. */
    #buildform .rendered-form h1,
    #buildform .rendered-form h2,
    #buildform .rendered-form h3,
    #buildform .rendered-form h4 {
        text-align: left !important;
        color: var(--affin-blue) !important;
        font-weight: 600 !important;
        margin-bottom: clamp(12px, 2.5vw, 22px) !important;
    }

    /* Declaration T&C rows — fix misaligned grid columns
       The checkbox + label text + link + trailing text are in separate grid cells.
       Force them into a clean readable layout on mobile. */
    .rendered-form:has(.h1-declaration) .fb-checkbox .form-check,
    .rendered-form:has(.h1-declaration) .checkbox {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
        padding: 8px 0 !important;
    }

        .rendered-form:has(.h1-declaration) .fb-checkbox label,
        .rendered-form:has(.h1-declaration) .checkbox label {
            flex: 1 !important;
            white-space: normal !important;
            line-height: 1.6 !important;
            font-size: clamp(13px, 2.4vw, 16px) !important;
        }

    /* Force all declaration text content into single-column block flow */
    .rendered-form:has(.h1-declaration) .field-checkbox-group,
    .rendered-form:has(.h1-declaration) .fb-checkbox-group {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        display: block !important;
    }

    /* Links inside declaration labels — inline, no column break */
    .rendered-form:has(.h1-declaration) label a,
    .rendered-form:has(.h1-declaration) .fb-checkbox label a {
        display: inline !important;
        white-space: normal !important;
        word-break: break-word !important;
    }
}
/* end §12 */


/* =============================================================================
   13 — VALIDATION & HELP TEXT
   ============================================================================= */
@media screen and (max-width: 768px) {

    /* Error label below field */
    label.error,
    .error-message,
    .invalid-feedback,
    .field-error {
        font-size: clamp(11px, 2.2vw, 14px) !important;
        color: var(--text-error) !important;
        display: block !important;
        margin-top: 4px !important;
        line-height: 1.4 !important;
    }

    /* Help / hint text */
    .help-text,
    .form-text,
    #buildform small {
        font-size: clamp(11px, 3vw, 12px) !important;
        color: var(--text-muted) !important;
        font-style: italic !important;
        display: block !important;
        margin-top: 4px !important;
        line-height: 1.4 !important;
    }

    /* Toastr — show at the top, offset below the fixed header (not pinned to bottom) */
    body.mobile-device #toast-container {
        top: calc(var(--nav-height) + 12px) !important;
        bottom: auto !important;
    }

        /* Hide the close (×) button on success toasts — clean look, auto-dismisses via timeOut */
        body.mobile-device #toast-container .toast-success .toast-close-button {
            display: none !important;
        }

        /* Compact toast sizing for mobile — overrides toastr.min.css fixed 18em/25em widths */
        body.mobile-device #toast-container > div {
            width: min(300px, calc(100vw - 24px)) !important;
            padding: 10px 12px 10px 42px !important;
            border-radius: 8px !important;
        }

        body.mobile-device #toast-container .toast-title {
            font-size: 14px !important;
        }

        body.mobile-device #toast-container .toast-message {
            font-size: 13px !important;
            line-height: 1.4 !important;
        }
}
/* end §13 */


/* =============================================================================
   14 — INLINE SCROLL-TO NAVIGATION
   Buttons sit at the bottom of the form content.
   User scrolls down to reach them naturally — no fixed/floating bar.
   ============================================================================= */
@media screen and (max-width: 768px) {

    /* Tab-navigation wrapper — INLINE, not fixed */
    body.mobile-device .tab-navigation,
    .tab-navigation {
        position: static !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 10px var(--page-h-pad) !important;
        padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
        background: #ffffff !important;
        background-color: #ffffff !important;
        border-top: 1px solid #eeeeee !important;
        box-shadow: none !important;
        margin-top: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* No transform, no z-index — it's part of the normal flow */
        transform: none !important;
        -webkit-transform: none !important;
        text-align: center !important;
    }

    /* Hide Page X of Y — unconditionally */
    .tab-indicator,
    .tab-indicator *,
    #currentTabIndicator {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        font-size: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* ── BACK — outlined AFFIN blue ─────────────────────────────── */
    body.mobile-device #prevBtn {
        width: 100% !important;
        min-height: 52px !important;
        padding: 14px 0 !important;
        background-color: #ffffff !important;
        color: #0768b3 !important;
        border: 1px solid #0768b3 !important;
        border-radius: 12px !important;
        box-shadow: none !important;
        outline: none !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        font-family: inherit !important;
        text-align: center !important;
        letter-spacing: 0.3px !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        transition: background-color 0.15s, transform 0.1s !important;
    }

        body.mobile-device #prevBtn:active {
            background-color: #e8f1fb !important;
            transform: scale(0.98) !important;
        }

    /* Hide Back button on Step 3 — Other Details page */
    body.mobile-device .rendered-form:has(.h1-learn-more-abt-you) ~ .tab-navigation #prevBtn,
    body.mobile-device:has(.rendered-form .h1-learn-more-abt-you) #prevBtn {
        display: none !important;
        visibility: hidden !important;
    }

    /* Hide Back button on "Step 3 - Almost there!" page —
       first page after eKYC; user must not navigate back to verification */
    body.mobile-device .rendered-form:has(.h1-almost-there) ~ .tab-navigation #prevBtn,
    body.mobile-device:has(.rendered-form .h1-almost-there) #prevBtn {
        display: none !important;
        visibility: hidden !important;
    }

    /* ── NEXT — solid AFFIN blue ─────────────────────────────────── */
    body.mobile-device #nextBtn {
        width: 100% !important;
        min-height: 52px !important;
        padding: 14px 0 !important;
        background-color: #0768b3 !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 10px rgba(7,104,179,0.3) !important;
        outline: none !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        font-family: inherit !important;
        text-align: center !important;
        letter-spacing: 0.3px !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        transition: background-color 0.15s, transform 0.1s !important;
    }

        body.mobile-device #nextBtn:active {
            background-color: #055a99 !important;
            transform: scale(0.98) !important;
        }

    /* ── SUBMIT — solid AFFIN blue ──────────────────────────────── */
    body.mobile-device #submitBtn {
        width: 100% !important;
        min-height: 52px !important;
        padding: 14px 0 !important;
        background-color: #0768b3 !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 10px rgba(7,104,179,0.3) !important;
        outline: none !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        font-family: inherit !important;
        text-align: center !important;
        letter-spacing: 0.3px !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        transition: background-color 0.15s, transform 0.1s !important;
    }

        body.mobile-device #submitBtn:active {
            background-color: #055a99 !important;
            transform: scale(0.98) !important;
        }

        body.mobile-device #submitBtn:disabled,
        body.mobile-device #submitBtn[disabled] {
            background-color: #a8c8e8 !important;
            box-shadow: none !important;
            cursor: not-allowed !important;
            transform: none !important;
        }

        /* Hide font-awesome icons — text only */
        body.mobile-device #prevBtn i,
        body.mobile-device #nextBtn i,
        body.mobile-device #submitBtn i {
            display: none !important;
        }

    /* Button text — hide original, inject via ::after */
    body.mobile-device #prevBtn {
        font-size: 0 !important;
    }

    body.mobile-device #nextBtn {
        font-size: 0 !important;
    }

    body.mobile-device #submitBtn {
        font-size: 0 !important;
    }

    body.mobile-device #prevBtn::after {
        content: "Back" !important;
        font-size: 16px !important;
        font-weight: 600 !important;
    }

    body.mobile-device #nextBtn::after {
        content: "Next" !important;
        font-size: 16px !important;
        font-weight: 700 !important;
    }

    body.mobile-device #submitBtn::after {
        content: "Submit" !important;
        font-size: 16px !important;
        font-weight: 700 !important;
    }
}
/* end §14 */


/* =============================================================================
   15 — MODALS
   PDF modal, email verification modal, eKYC success modal, QR modal.
   iOS body scroll leak fix: when a modal opens, JS sets
   body { position:fixed; width:100%; overflow:hidden }.
   We restore scroll position on close (handled in JS).
   ============================================================================= */
@media screen and (max-width: 768px) {

    /* PDF viewer modal backdrop — hidden by default, flexbox for centering when shown via JS */
    #pdf-modal {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0,0,0,0.8) !important;
        z-index: 9999 !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        padding: 20px !important;
    }

    /* Show modal with flex when JS sets display:block */
    #pdf-modal[style*="display: block"] {
        display: flex !important;
    }

    /* Generic modal content wrappers */
    .email-verification-modal-content,
    .qr-verification-modal-content,
    .success-modal-content,
    .review-email-modal-content {
        width: 95% !important;
        max-width: 460px !important;
        max-height: 90vh !important;
        max-height: 90dvh !important;
        border-radius: var(--radius-modal) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
    }

    /* PDF Modal on Mobile — just adjust size.
       HTML structure: Modal > Container (flex column) > [Header, Scroller, Footer]
       The scroller is a div of pdf.js canvases, not an iframe: mobile browsers
       have no inline PDF viewer for an iframe, so it could never scroll. */

    #pdf-modal > div {
        width: 95% !important;
        max-width: 95vw !important;
        height: 92vh !important;
        height: 92dvh !important;
        /* Container uses PC's flex layout — don't override */
    }

    /* min-height:0 is load-bearing — without it a flex child in a column
       container refuses to shrink below its content height, so it overflows
       instead of scrolling. */
    #pdf-scroll-container {
        flex: 1 !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
    }

    /* PDF modal confirm button — always visible, enabled by JS */
    #pdf-confirm {
        min-height: var(--touch-min) !important;
        padding: clamp(10px, 2vw, 16px) clamp(20px, 4vw, 36px) !important;
        font-size: clamp(14px, 2.6vw, 18px) !important;
        border-radius: 6px !important;
        touch-action: manipulation !important;
    }

    /* UIUX2 — Cancel button removed on mobile; X close in header remains */
    #pdf-cancel {
        display: none !important;
    }

    /* QR code display */
    #qrCodeDisplay {
        width: clamp(180px, 33vw, 280px) !important;
        height: clamp(180px, 33vw, 280px) !important;
        max-width: 100% !important;
    }

    /* eKYC success modal */
    #ekycSuccessModal > div {
        width: 90% !important;
        max-width: 380px !important;
        border-radius: var(--radius-modal) !important;
        padding: clamp(20px, 4vw, 36px) !important;
    }
}
/* end §15 */


/* =============================================================================
   16 — SYSTEM / HIDDEN FIELDS
   These fields exist for server-side logic, never shown to end users.
   ============================================================================= */
@media screen and (max-width: 768px) {

    .dis-field-container,
    .pdf-builder-field,
    .amla-document-field,
    .qrcode-field,
    .email-verification-wrapper,
    .mobius-hidden-wrapper,
    .occupation-validation-wrapper,
    .fb-dis_verification,
    .fb-pdf_builder,
    .fb-amla_document,
    .fb-qrcode {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        pointer-events: none !important;
    }
}
/* end §16 */


/* =============================================================================
   17 — BUG FIXES (Issues 1–4)
   ============================================================================= */
@media screen and (max-width: 768px) {

    /*
     * ISSUE 1 — eKYC parent tab does not refresh after new-tab completion.
     * CSS-side: ensure the eKYC verification step area shows a clear
     * "waiting" state on mobile so users know to return to this tab.
     * The JS fix (localStorage + focus event) handles the actual refresh.
     */
    .ekyc-waiting-indicator {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
        gap: 12px !important;
        padding: clamp(24px, 4.5vw, 38px) var(--page-h-pad) !important;
        text-align: center !important;
        color: var(--text-muted) !important;
        font-size: clamp(13px, 2.5vw, 17px) !important;
    }

    /*
     * ISSUE 2 — Resume shows eKYC step even if already verified.
     * CSS-side: when eKYC is complete, hide the QR/button area
     * and show the success badge. JS sets data-ekyc-done on the container.
     */
    [data-ekyc-done="true"] .ekyc-action-area {
        display: none !important;
    }

    [data-ekyc-done="true"] .ekyc-success-badge {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        color: #28a745 !important;
        font-size: clamp(13px, 2.6vw, 16px) !important;
        font-weight: 500 !important;
        padding: clamp(14px, 2.8vw, 24px) !important;
    }

    /*
     * ISSUE 3 — PDF modal scrolling.
     * Not a CSS problem: mobile browsers have no inline PDF viewer for an
     * <iframe>, so the scroll container the PC relies on never existed here.
     * FIXED in declaration-CONTENT.js — the mobile modal now renders the pages
     * with pdf.js into a real scrollable div. Sizing lives in §15.
     */

    /*
     * ISSUE 4 — "Mobius Checking" label visible to end users.
     * Belt-and-suspenders: both the label and its parent fb- wrapper.
     * Primary fix is in §6; this catches any edge-case rendering paths.
     */
    .fb-mobius_checking,
    .fb-mobius_checking > *:not(.mobius-hidden-wrapper) {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

        /* Restore the hidden data wrapper itself (needed by JS for API status saving) */
        .fb-mobius_checking .mobius-hidden-wrapper {
            display: none !important;
            position: absolute !important;
            overflow: hidden !important;
            height: 0 !important;
            width: 0 !important;
            pointer-events: none !important;
        }
}
/* end §17 */


/* =============================================================================
   18 — 480px TIGHTENING PASS
   Small phones: mid-range Redmi Note / Vivo Y / Oppo A.
   These values are intentionally higher vw% — viewport here is ≤480px
   so the multipliers correctly produce tighter values at this range.
   Only overrides that need tightening — everything else inherits from above.
   ============================================================================= */
@media screen and (max-width: 480px) {

    body {
        padding-top: clamp(72px, 18vw, 84px) !important;
    }

        body.mobile-device .progress-circle {
            width: clamp(22px, 6.2vw, 28px) !important;
            height: clamp(22px, 6.2vw, 28px) !important;
            font-size: clamp(10px, 2.8vw, 12px) !important;
        }

        body.mobile-device .progress-label {
            font-size: clamp(6px, 1.8vw, 8px) !important;
            max-width: clamp(38px, 12vw, 52px) !important;
        }

    /* Ensure inputs never trigger iOS zoom at this width */
    #buildform input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
    #buildform textarea,
    #buildform .chosen-container-single .chosen-single,
    #buildform .chosen-container .chosen-single,
    #buildform .chosen-container .chosen-search input[type="text"],
    #buildform .chosen-container .chosen-results li {
        font-size: 16px !important;
    }

    /* Tighten button padding */
    #nextBtn,
    #prevBtn,
    #submitBtn,
    body.mobile-device .form-navigation-integrated #prevBtn {
        font-size: clamp(14px, 3.8vw, 15px) !important;
        padding: clamp(11px, 2.2vw, 14px) 0 !important;
    }
}
/* end §18 */


/* =============================================================================
   19 — 360px FLOOR PASS
   Absolute minimum — Redmi A series, Vivo Y16, budget Realme C.
   Android Go devices are in this range. Keep rules minimal;
   these devices have limited RAM, fewer rules = faster paint.
   ============================================================================= */
@media screen and (max-width: 360px) {

    /* Tighten horizontal padding to recover 4px each side */
    :root {
        --page-h-pad: 12px;
    }

    form#processresults {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Compress progress bar to fit all steps at 360px */
    body.mobile-device .progress-circle {
        width: 22px !important;
        height: 22px !important;
        font-size: 10px !important;
    }

    body.mobile-device .progress-label {
        font-size: 6px !important;
        max-width: 36px !important;
    }

    .progress-bar-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* Section headers — follow the shared title size (wraps if too long) */
    .h4-personal-info-final,
    .h4-address-info-final,
    .h4-employment-info-final {
        font-size: var(--mobile-title-size) !important;
    }
}
/* end §19 */


/* =============================================================================
   20 — SUMMARY PAGE, DECLARATION & EMPLOYER FIELD FIXES
   ─────────────────────────────────────────────────────────────────────────────
   KEY INSIGHT from ff-main-affin.css:
   • The ▼ toggle is a CSS ::after pseudo-element on the section header DIV
     (not a real <button>). It cannot receive JS click events directly.
     Fix: make the ENTIRE header div the click target.
   • The "✎ Edit" text is an h4::after pseudo-element
     (content: '✎ Edit' on .h4-personal-info-final::after etc.)
     Fix: suppress h4::after on mobile — the header div itself is the edit trigger.
   ============================================================================= */
@media screen and (max-width: 768px) {

    /* ── SUMMARY PAGE — Section header row ──────────────────────────── */

    /* Section header div — full-width tap target, flex row.
       #buildform prefix is REQUIRED: §5's #buildform .rendered-form > div[class]
       { display:block !important } is ID-weighted and otherwise beats this rule,
       dropping the ▼/▲ circle onto its own line below the title.
       `body` (not body.mobile-device): that class is UA-sniffed in
       formviewer.cshtml, so it is absent in iframe previews / desktop-UA
       narrow windows — the @media query is the real mobile gate here. */
    body #buildform .rendered-form > div:has(.h4-personal-info-final),
    body #buildform .rendered-form > div:has(.h4-address-info-final),
    body #buildform .rendered-form > div:has(.h4-employment-info-final),
    body #buildform .rendered-form > div:has(.h4-employer-info-final),
    body #buildform .rendered-form > div:has(.h4-reason-acc-open-final) {
        display: flex !important;
        align-items: center !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        padding: clamp(12px, 2.2vw, 20px) 0 !important;
        gap: 0 !important;
        border-bottom: 1px solid #e8e8e8 !important;
        margin-bottom: 0 !important;
        position: relative !important;
        overflow: visible !important;
        cursor: pointer !important;
        /* Make the whole row the tap target */
        -webkit-tap-highlight-color: rgba(7,104,179,0.08) !important;
        touch-action: manipulation !important;
    }

    /* Section title — taps on the title (and its "✎ Edit" pseudo-element)
       must reach toggle-edit-v10's h4 click branch, so pointer-events stays
       ON; taps elsewhere in the row still hit the row div = collapse toggle */
    .h4-personal-info-final,
    .h4-address-info-final,
    .h4-employment-info-final,
    .h4-employer-info-final,
    .h4-reason-acc-open-final {
        flex: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: var(--mobile-title-size) !important;
        font-weight: 600 !important;
        color: var(--affin-blue) !important;
        line-height: 1.3 !important;
        display: inline !important;
        white-space: normal !important;
        overflow: visible !important;
        overflow-wrap: break-word !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }

    /* Font-size repeated at ID specificity — the single-class rule above loses
       to §12's `#buildform h4` (ID + type beats one class), which pins 14px */
    body #buildform .rendered-form .h4-personal-info-final,
    body #buildform .rendered-form .h4-address-info-final,
    body #buildform .rendered-form .h4-employment-info-final,
    body #buildform .rendered-form .h4-employer-info-final,
    body #buildform .rendered-form .h4-reason-acc-open-final {
        font-size: var(--mobile-title-size) !important;
    }

    /* "✎ Edit" pseudo-element on the h4 — restyled for mobile so it sits
       inline with the section title, on the same line as the round toggle.
       ff-main-affin.css line 4620 draws it on desktop; toggle-edit-v10.js
       swaps it to '✎ Save' by adding .editing to the h4. */
    body .h4-personal-info-final::after,
    body .h4-address-info-final::after,
    body .h4-employment-info-final::after,
    body .h4-employer-info-final::after,
    body .h4-reason-acc-open-final::after {
        content: '✎ Edit' !important;
        display: inline !important;
        font-size: 12px !important;
        font-weight: 400 !important;
        color: var(--text-secondary) !important;
        margin-left: 10px !important;
        text-decoration: underline !important;
        vertical-align: middle !important;
    }

    /* Edit mode active — show Save (toggle-edit-v10 injects a low-specificity
       h4.editing::after rule; this rule must mirror it) */
    body .h4-personal-info-final.editing::after,
    body .h4-address-info-final.editing::after,
    body .h4-employment-info-final.editing::after,
    body .h4-employer-info-final.editing::after,
    body .h4-reason-acc-open-final.editing::after {
        content: '✎ Save' !important;
        color: var(--affin-blue) !important;
        font-weight: 600 !important;
    }

    /* ID Type is not shown on the mobile review screen (Defect 8 Jul:
       value never populates there — remove the field from the summary).
       #buildform prefix required to beat §5's ID-weighted display:block. */
    body #buildform .rendered-form:has(.h4-personal-info-final) .field-IDTYPE {
        display: none !important;
    }

    /* REPLACE the div::after ▼ button with our own styled indicator.
       ff-main-affin.css uses div::after { content:'▼'; background:#0768B3; border-radius:50% }
       We keep the same look but ensure it appears correctly on mobile. */
    body .rendered-form > div:has(.h4-personal-info-final)::after,
    body .rendered-form > div:has(.h4-address-info-final)::after,
    body .rendered-form > div:has(.h4-employment-info-final)::after,
    body .rendered-form > div:has(.h4-employer-info-final)::after,
    body .rendered-form > div:has(.h4-reason-acc-open-final)::after {
        content: '▼' !important;
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        background-color: var(--affin-blue) !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #ffffff !important;
        font-size: 10px !important;
        flex-shrink: 0 !important;
        pointer-events: none !important;
        transition: transform var(--transition-std) !important;
    }

    /* Collapsed state → ▲ */
    body .rendered-form > div.collapsed:has(.h4-personal-info-final)::after,
    body .rendered-form > div.collapsed:has(.h4-address-info-final)::after,
    body .rendered-form > div.collapsed:has(.h4-employment-info-final)::after,
    body .rendered-form > div.collapsed:has(.h4-employer-info-final)::after,
    body .rendered-form > div.collapsed:has(.h4-reason-acc-open-final)::after {
        content: '▲' !important;
    }

    /* Hide any real <button> inside header rows (if CMS renders one) */
    body .rendered-form > div:has(.h4-personal-info-final) button,
    body .rendered-form > div:has(.h4-address-info-final) button,
    body .rendered-form > div:has(.h4-employment-info-final) button,
    body .rendered-form > div:has(.h4-employer-info-final) button,
    body .rendered-form > div:has(.h4-reason-acc-open-final) button {
        display: none !important;
    }

    /* Hide Edit link <a> elements in header rows (Edit is via the row click) */
    body .rendered-form > div:has(.h4-personal-info-final) a,
    body .rendered-form > div:has(.h4-address-info-final) a,
    body .rendered-form > div:has(.h4-employment-info-final) a,
    body .rendered-form > div:has(.h4-employer-info-final) a,
    body .rendered-form > div:has(.h4-reason-acc-open-final) a {
        display: none !important;
    }

    /* REMOVE orphan "Edit" text divs that appear below section headers.
       These are bare divs containing only the text "Edit" — CSS :has() approach.
       JS §2e handles this too as a fallback for older WebViews. */
    body.mobile-device .rendered-form > div > span:only-child,
    body.mobile-device .summary-edit-label {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Hide the CMS "Edit" button rows (edit-btn-*-final). ff-main-affin.css
       hides them with a non-!important display:none that loses to the
       #buildform .form-group { display:block !important } rule in §5, so on
       mobile they popped back up as dead "Edit" text below each header.
       #buildform prefix required to actually outweigh that §5 rule. */
    body #buildform .rendered-form > div:has(.edit-btn-personal-info-final),
    body #buildform .rendered-form > div:has(.edit-btn-address-info-final),
    body #buildform .rendered-form > div:has(.edit-btn-employer-info-final),
    body #buildform .rendered-form > div:has(.edit-btn-employer-address-final),
    body #buildform .rendered-form > div:has(.edit-btn-reason-acc-open-final) {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    /* Employment / Employer section spacing */
    body .rendered-form > div:has(.h4-employment-info-final) {
        margin-top: clamp(8px, 1.8vw, 16px) !important;
    }

    body .rendered-form > div:has(.h4-employer-info-final) {
        margin-top: clamp(8px, 1.8vw, 16px) !important;
    }

    body .rendered-form > div:has(.h4-reason-acc-open-final) {
        margin-top: clamp(8px, 1.8vw, 16px) !important;
    }

    /* ── EMPLOYER SECTION — Company Name / Employer Address ──────────── */
    #buildform .field-COMPANYNAME input,
    #buildform .field-EMPLOYERADDRESS input,
    #buildform [class*="COMPANYNAME"] input,
    #buildform [class*="EMPLOYERADDRESS"] input,
    #buildform [class*="EMPLOYER"] input[type="text"] {
        background-color: #ffffff !important;
        border: 1px solid var(--border-input) !important;
        border-bottom: 2px solid var(--border-input) !important;
        border-radius: var(--radius-input) !important;
        color: var(--text-primary) !important;
        font-size: 16px !important;
        min-height: var(--touch-min) !important;
        padding: 0 clamp(12px, 2.5vw, 20px) !important;
        line-height: var(--touch-min) !important;
    }

        #buildform .field-COMPANYNAME input::placeholder,
        #buildform .field-EMPLOYERADDRESS input::placeholder,
        #buildform [class*="COMPANYNAME"] input::placeholder,
        #buildform [class*="EMPLOYERADDRESS"] input::placeholder {
            color: var(--text-placeholder) !important;
            -webkit-text-fill-color: var(--text-placeholder) !important;
        }

    /* ── DECLARATION PAGE ────────────────────────────────────────────── */
    body.mobile-device #buildform .rendered-form:has(.h1-declaration) h1,
    body.mobile-device #buildform .rendered-form:has(.h1-declaration) h2,
    body.mobile-device #buildform .rendered-form:has(.h1-declaration) h3,
    body.mobile-device #buildform .rendered-form:has(.h1-declaration) h4,
    body.mobile-device #buildform .rendered-form:has(.h1-declaration) h5,
    body.mobile-device #buildform .h1-declaration,
    body.mobile-device .h1-declaration {
        text-align: center !important;
        font-size: clamp(22px, 4.2vw, 30px) !important;
        font-weight: 700 !important;
        color: #111111 !important;
        width: 100% !important;
        display: block !important;
        margin-bottom: clamp(16px, 3vw, 28px) !important;
    }

    .rendered-form:has(.h1-declaration) .fb-checkbox,
    .rendered-form:has(.h1-declaration) .fb-checkbox-group > div {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 10px !important;
        margin-bottom: clamp(14px, 2.8vw, 22px) !important;
        width: 100% !important;
    }

        /* Checkbox box is 20px flush to the row top (margin-top:2px from
           ff-main-affin.css); the label's first line has leading above the
           glyph (line-height 1.6 > font size), so the box rides ~6px above
           the text it sits next to. Nudge it down to align with the text. */
        .rendered-form:has(.h1-declaration) .fb-checkbox input[type="checkbox"] {
            margin-top: 8px !important;
        }

        /* Label wraps the flowing text — block so inline children flow naturally */
        body.mobile-device #buildform .rendered-form:has(.h1-declaration) .fb-checkbox label,
        .rendered-form:has(.h1-declaration) .fb-checkbox label,
        .rendered-form:has(.h1-declaration) .fb-checkbox-group label,
        .rendered-form:has(.h1-declaration) .form-check label,
        .rendered-form:has(.h1-declaration) .checkbox label {
            display: block !important; /* block, NOT flex/inline — lets text flow */
            flex: 1 !important;
            font-size: clamp(13px, 2.5vw, 15px) !important;
            line-height: 1.6 !important;
            color: #333333 !important;
            font-weight: 400 !important;
            white-space: normal !important;
            word-break: normal !important;
            overflow-wrap: break-word !important;
            min-width: 0 !important;
        }

            /* "Terms and Conditions" and "Product Disclosure Sheet" —
               inline within the sentence, AFFIN blue, underlined.
               display:inline ensures they sit mid-sentence, not on their own line. */
            body.mobile-device #buildform .rendered-form:has(.h1-declaration) .fb-checkbox label a,
            .rendered-form:has(.h1-declaration) .fb-checkbox label a,
            .rendered-form:has(.h1-declaration) label a {
                display: inline !important;
                color: var(--affin-blue) !important;
                -webkit-text-fill-color: var(--affin-blue) !important;
                font-weight: 600 !important;
                text-decoration: underline !important;
                white-space: normal !important;
                word-break: normal !important;
                overflow-wrap: break-word !important;
                vertical-align: baseline !important;
            }

    /* ── Same declaration fixes via the .ff-declaration-page marker class ──
       (set on #buildform by declaration-CONTENT.js). Kept as SEPARATE rules,
       not merged into the :has() lists above: a selector list containing an
       unsupported :has() is dropped entirely on older Android WebViews.
       These also win without body.mobile-device — the :has() rules above
       lose to §8's `#buildform .fb-checkbox label {display:flex}` (1,1,1)
       unless body.mobile-device is set, which is UA-detected only. */
    /* Row = checkbox + label side by side. NOTE: do NOT target
       `.fb-checkbox-group > div` here — that is .checkbox-group (the wrapper
       of ALL rows); at this specificity it would beat §8's
       `#buildform .checkbox-group {display:block}` and lay the three
       declaration rows out side by side. */
    #buildform.ff-declaration-page .checkbox-group .fb-checkbox {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 10px !important;
        margin-bottom: clamp(14px, 2.8vw, 22px) !important;
        width: 100% !important;
    }

        /* See margin-top note in the :has() block above — same fix, marker-class path. */
        #buildform.ff-declaration-page .checkbox-group .fb-checkbox input[type="checkbox"] {
            margin-top: 8px !important;
        }

    /* Label must be block, NOT flex — with display:flex the text before
           the link, the injected span, and the text after it become three
           side-by-side flex items (the "3 columns per line" defect). */
    #buildform.ff-declaration-page .fb-checkbox label,
    #buildform.ff-declaration-page .checkbox-group label,
    #buildform.ff-declaration-page .form-check label,
    #buildform.ff-declaration-page .checkbox label {
        display: block !important;
        flex: 1 !important;
        font-size: clamp(13px, 2.5vw, 15px) !important;
        line-height: 1.6 !important;
        color: #333333 !important;
        font-weight: 400 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        min-width: 0 !important;
    }

        #buildform.ff-declaration-page .fb-checkbox label a,
        #buildform.ff-declaration-page label a {
            display: inline !important;
            color: var(--affin-blue) !important;
            -webkit-text-fill-color: var(--affin-blue) !important;
            font-weight: 600 !important;
            text-decoration: underline !important;
            white-space: normal !important;
            word-break: normal !important;
            overflow-wrap: break-word !important;
            vertical-align: baseline !important;
        }

    .rendered-form:has(.h1-declaration) ~ .tab-navigation #prevBtn,
    body.mobile-device:has(.rendered-form .h1-declaration) #prevBtn {
        border-width: 1px !important;
    }
}
/* end §20 */
