/* A single mobile layout layer. Short steps keep a stable shell; only their
   choices/form panel scrolls. Landing pages and long legal copy remain readable.
   No content, consent, financial state or animation is removed to make it fit. */
@media (max-width: 900px), (max-height: 500px) and (pointer: coarse) {
  html[data-wise-mobile-layout] {
    --mobile-gutter: max(clamp(8px, 2.5vw, 16px), env(safe-area-inset-left), env(safe-area-inset-right));
    --mobile-top: env(safe-area-inset-top, 0px);
    --mobile-bottom: env(safe-area-inset-bottom, 0px);
    --mobile-screen: var(--wise-screen-height, 100dvh);
    --mobile-control-height: 46px;
    --mobile-card-radius: clamp(18px, 4.8vw, 24px);
    --mobile-control-radius: 16px;
    --mobile-copy-size: 15px;
    --mobile-copy-leading: 21px;
    min-width: 0 !important;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-synthesis-weight: none;
  }
  html[data-wise-mobile-layout] body { min-width: 0 !important; overflow-x: clip !important; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
  html[data-wise-mobile-layout] :where(.wrap, .container, .card, .ca-main, .ca-stage, .ca-form, .pq-main, .pq-card, .contract-shell, .contract-card, .flow-status-page) { min-width: 0 !important; max-width: 100%; box-sizing: border-box; }
  html[data-wise-mobile-layout] :where(img, video, canvas, svg) { max-width: 100%; }
  html[data-wise-mobile-layout] :where(h1, h2, h3, h4, p, label, button, a, span) { overflow-wrap: break-word; word-break: normal; }
  html[data-wise-mobile-layout] :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]) { font-size: 16px !important; }
  html[data-wise-mobile-layout] :is(input, select, textarea, button, a, label, summary, [role="button"]) { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

  /* Questionnaire: the header, progress and CTA are siblings of the scrolling
     choice region, so address bars, rotation and selection cannot move them. */
  html[data-wise-mobile-layout]:has(body.flow-step-ui:is([data-demo-route="/2.html"], [data-demo-route="/3.html"], [data-demo-route="/4.html"], [data-demo-route="/5.html"], [data-demo-route="/6.html"], [data-demo-route="/7.html"])) {
    height: 100% !important;
    overflow: hidden !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui:is([data-demo-route="/2.html"], [data-demo-route="/3.html"], [data-demo-route="/4.html"], [data-demo-route="/5.html"], [data-demo-route="/6.html"], [data-demo-route="/7.html"]) {
    display: flex !important;
    flex-direction: column !important;
    height: var(--mobile-screen) !important;
    min-height: 0 !important;
    max-height: var(--mobile-screen) !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui:is([data-demo-route="/2.html"], [data-demo-route="/3.html"], [data-demo-route="/4.html"], [data-demo-route="/5.html"], [data-demo-route="/6.html"], [data-demo-route="/7.html"]) > .header {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding-top: var(--mobile-top) !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui .header .header-content { box-sizing: border-box; display: flex !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: space-between !important; gap: 10px !important; min-height: 54px !important; height: 54px !important; padding: 7px var(--mobile-gutter) !important; overflow: hidden !important; }
  html[data-wise-mobile-layout] body.flow-step-ui .header .header-left { display: flex !important; align-items: center !important; flex: 0 0 auto !important; min-width: 0 !important; }
  html[data-wise-mobile-layout] body.flow-step-ui .header .header-right { display: flex !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: flex-end !important; gap: 8px !important; flex: 1 1 auto !important; min-width: 0 !important; }
  html[data-wise-mobile-layout] body.flow-step-ui .header .user-info { flex: 0 1 auto !important; min-width: 0 !important; max-width: 100% !important; text-align: right !important; }
  html[data-wise-mobile-layout] body.flow-step-ui .header .user-name { display: block !important; max-width: 100% !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; line-height: 1.2 !important; }
  html[data-wise-mobile-layout] body.flow-step-ui .header .avatar { flex: 0 0 32px !important; width: 32px !important; height: 32px !important; border-radius: 50% !important; display: flex !important; align-items: center !important; justify-content: center !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .flow-progress-shell { flex: 0 0 auto !important; width: calc(100% - 24px) !important; max-width: 560px !important; margin: 5px auto !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .container {
    flex: 1 1 0 !important; display: flex !important; min-height: 0 !important; height: auto !important;
    padding: 0 var(--mobile-gutter) 8px !important; overflow: hidden !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .container > .card {
    display: flex !important; flex-direction: column !important; flex: 1 1 0 !important;
    width: 100% !important; max-width: 560px !important; min-height: 0 !important; height: auto !important; overflow: hidden !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card :is(h1.title, h1),
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .step-header h1 { flex: 0 0 auto; font-size: clamp(26px, 7vw, 34px) !important; line-height: 1.12 !important; margin: 6px 0 0 !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card :is(p.subtitle, .lead) { flex: 0 0 auto; font-size: 16px !important; line-height: 22px !important; margin: 6px 0 12px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card :is(.section-label, .flow-option-label) { margin: 0 0 7px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card > :is(.grid, .list) {
    flex: 1 1 0 !important; min-height: 0 !important; overflow-x: hidden !important; overflow-y: auto !important;
    align-content: start !important; margin-top: 0 !important; padding: 2px !important; gap: 7px !important;
    overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card .grid > .opt { min-height: 100px !important; padding: 12px !important; gap: 10px !important; border-radius: 20px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card .grid > .opt > svg { width: 40px !important; height: 40px !important; min-width: 40px !important; min-height: 40px !important; flex-basis: 40px !important; padding: 9px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card .grid > .opt > span { font: 500 16px/21px var(--wise-font-ui) !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge):is([data-demo-route="/4.html"], [data-demo-route="/6.html"]) .card .list { grid-template-columns: minmax(0, 1fr) !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge):is([data-demo-route="/4.html"], [data-demo-route="/6.html"]) .card .list > .opt { min-height: 48px !important; height: auto !important; padding: 6px 10px !important; gap: 9px !important; border-radius: 16px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge):is([data-demo-route="/4.html"], [data-demo-route="/6.html"]) .card .list > .opt > svg { flex: 0 0 34px !important; width: 34px !important; height: 34px !important; min-width: 34px !important; min-height: 34px !important; padding: 7px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge):is([data-demo-route="/4.html"], [data-demo-route="/6.html"]) .card .list > .opt > span { font: 500 16px/21px var(--wise-font-ui) !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/7.html"] .card > .list.wq-credit { gap: 8px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/7.html"] .card > .list.wq-credit > .opt { height: auto !important; min-height: 92px !important; padding: 12px !important; gap: 12px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/7.html"] .card > .list.wq-credit :is(.opt-title, .opt-desc) { font-size: 15px !important; line-height: 20px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/7.html"] .card > .list.wq-credit .opt-desc { font-size: 14px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .actions {
    position: relative !important; inset: auto !important; flex: 0 0 auto !important; margin: 0 !important;
    padding: 7px max(var(--mobile-gutter), calc((100% - 560px) / 2)) calc(7px + var(--mobile-bottom)) !important;
    gap: 5px 8px !important; backdrop-filter: none !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .actions :is(.btn-next, .btn-voltar) { min-height: 48px !important; height: auto !important; padding: 10px 16px !important; font-size: 17px !important; line-height: 22px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .actions .btn-next { flex: 1 1 140px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .actions .flow-privacy-note { font-size: 11px !important; line-height: 15px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/5.html"] .card { overflow-y: auto !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/5.html"] .card .field-group { margin-top: 14px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/5.html"] .card .field-header { min-height: 34px !important; margin-bottom: 6px !important; gap: 10px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/5.html"] .card :is(.select-display, #dayInput) { min-height: 52px !important; padding: 12px !important; border-radius: 18px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/5.html"] #rendaOptions {
    max-height: min(432px, calc(var(--mobile-screen) - 400px)) !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
  }

  /* Identity and contact: scrolling belongs to the form, never a clipped page. */
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/2.html"] > .container { flex: 1 1 0 !important; min-height: 0 !important; padding: 10px var(--mobile-gutter) calc(10px + var(--mobile-bottom)) !important; overflow-y: auto !important; justify-content: flex-start !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/2.html"] .container > .card { overflow: visible !important; }
  html[data-wise-mobile-layout]:has(body.flow-step-ui[data-demo-route="/8.html"]) { height: 100% !important; overflow: hidden !important; scrollbar-gutter: auto !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] { --flow-header-height: 46px !important; display: flex !important; flex-direction: column !important; height: var(--mobile-screen) !important; min-height: 0 !important; max-height: var(--mobile-screen) !important; overflow: hidden !important; padding: 0 !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] > .wrap { display: flex !important; flex-direction: column !important; flex: 1 1 auto !important; height: 100% !important; min-height: 0 !important; box-sizing: border-box !important; padding: 0 !important; overflow: hidden !important; }
  html[data-wise-mobile-layout] body.flow-step-ui:not(.flow-camera-screen):not(.guided-chat)[data-demo-route="/8.html"] > .wrap > .header { position: relative !important; top: auto !important; right: auto !important; bottom: auto !important; left: auto !important; inset: auto !important; flex: 0 0 auto !important; height: auto !important; min-height: 0 !important; padding-top: var(--mobile-top) !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] > .wrap > .header .header-content { height: 46px !important; min-height: 46px !important; padding-block: 5px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] > .wrap > .flow-progress-shell { flex: 0 0 auto !important; width: calc(100% - 24px) !important; margin: 4px auto 2px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui:not(.flow-camera-screen):not(.guided-chat)[data-demo-route="/8.html"] .flow-progress-track { position: relative !important; top: auto !important; left: auto !important; right: auto !important; margin-top: 4px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] .wrap > .card { flex: 1 1 0 !important; min-height: 0 !important; overflow-y: auto !important; overscroll-behavior-y: contain; width: 100% !important; margin: 0 !important; padding: 6px var(--mobile-gutter) calc(10px + var(--mobile-bottom)) !important; display: flex !important; flex-direction: column !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] #contactForm { display: flex !important; flex-direction: column !important; flex: 1 1 auto !important; min-height: 0 !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] #submitBtn { margin-top: auto !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] .card h1 { font-size: clamp(20px, 5.4vw, 24px) !important; line-height: 1.12 !important; margin: 0 0 3px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] .card .lead { font-size: 13px !important; line-height: 17px !important; margin: 0 0 6px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] .info-box { display: flex !important; align-items: flex-start !important; gap: 10px !important; margin: 4px 0 8px !important; padding: 9px 11px !important; border-radius: 16px !important; box-shadow: 0 10px 22px rgba(0,45,98,.11), 0 2px 6px rgba(0,45,98,.06) !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] .info-icon { width: 30px !important; height: 30px !important; min-width: 30px !important; margin: 0 !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] .info-title { font-size: 13px !important; line-height: 17px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] .info-list { margin: 4px 0 0 !important; gap: 3px !important; font-size: 12.5px !important; line-height: 16px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] .info-list li { font-size: 12.5px !important; line-height: 16px !important; gap: 6px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] .form-group { margin-bottom: 7px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] .form-label { font-size: 11px !important; line-height: 15px !important; margin-bottom: 4px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] :is(.form-input, .phone-prefix) { min-height: 44px !important; height: 44px !important; padding: 8px 12px !important; font-size: 15px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] .contact-consent { font-size: 12px !important; line-height: 16px !important; gap: 8px !important; margin: 2px 0 8px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] .btn-submit { min-height: 46px !important; padding: 10px 14px !important; font-size: 15px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/8.html"] > .cf-foot { display: none !important; }

  /* Smart fluid mobile layout for prequiz (every phone height/width, zero card clipping). */
  html[data-wise-mobile-layout]:has(body.prequiz-page) { height: auto !important; min-height: 100% !important; overflow-x: hidden !important; overflow-y: auto !important; color-scheme: light only !important; }
  html[data-wise-mobile-layout] body.prequiz-page { height: auto !important; min-height: var(--mobile-screen) !important; overflow-x: hidden !important; overflow-y: visible !important; background: #f4f6f8 !important; }
  html[data-wise-mobile-layout] .pq-header { flex: 0 0 auto; padding: calc(10px + var(--mobile-top)) var(--mobile-gutter) 10px; }
  html[data-wise-mobile-layout] .pq-brand img { height: 26px; }
  html[data-wise-mobile-layout] .pq-main { flex: 1 0 auto; min-height: 0; align-items: flex-start; padding: 4px var(--mobile-gutter) calc(18px + var(--mobile-bottom)); }
  html[data-wise-mobile-layout] .pq-card { display: flex; flex-direction: column; height: auto !important; min-height: 0; padding: clamp(16px, 4.5vw, 22px) clamp(14px, 4vw, 18px); border-radius: 24px; }
  html[data-wise-mobile-layout] .pq-progress { flex: 0 0 auto; margin-bottom: 12px; }
  html[data-wise-mobile-layout] .pq-counter { flex: 0 0 auto; margin-bottom: 8px; }
  html[data-wise-mobile-layout] .pq-steps { display: block; flex: 0 0 auto; min-height: 0; }
  html[data-wise-mobile-layout] .pq-step:not([hidden]) { display: flex; flex-direction: column; width: 100%; min-height: 0; }
  html[data-wise-mobile-layout] .pq-step h1 { flex: 0 0 auto; font-size: clamp(23px, 6.5vw, 30px); line-height: 1.14; }
  html[data-wise-mobile-layout] .pq-subtitle { flex: 0 0 auto; margin: 6px 0 14px; font-size: 14.5px; line-height: 20px; }
  html[data-wise-mobile-layout] .pq-options { display: flex; flex-direction: column; flex: 0 0 auto !important; gap: 10px; padding: 2px 0; overflow: visible !important; }
  html[data-wise-mobile-layout] .pq-opt { min-height: 48px; padding: 12px 14px; font-size: 15.5px; border-radius: 16px; height: auto !important; flex: 0 0 auto; }
  html[data-wise-mobile-layout] .pq-note { flex: 0 0 auto; margin: 14px 0 0; font-size: 12px; line-height: 17px; }
  html[data-wise-mobile-layout] .pq-actions { flex: 0 0 auto; margin-top: 12px; gap: 8px; }
  html[data-wise-mobile-layout] :is(.pq-next, .pq-back) { min-height: 48px; padding: 10px 18px; }

  /* Citi: compact header/footer, a stable action row and a scrollable set
     of fields/options. Long addresses and review data are not cut or hidden. */
  html[data-wise-mobile-layout]:has(body.ca-body) { height: 100%; overflow: hidden; }
  html[data-wise-mobile-layout] body.ca-body { height: var(--mobile-screen); min-height: 0; overflow: hidden; }
  html[data-wise-mobile-layout] .ca-header { flex: 0 0 auto; height: calc(54px + var(--mobile-top)); padding: calc(8px + var(--mobile-top)) 0 8px; }
  html[data-wise-mobile-layout] .ca-header-inner { padding-inline: var(--mobile-gutter); }
  html[data-wise-mobile-layout] .ca-main { flex: 1 1 0; min-height: 0; }
  html[data-wise-mobile-layout] .ca-progress { width: calc(100% - 24px); max-width: 600px; flex: 0 0 auto; margin: 8px auto 0; }
  html[data-wise-mobile-layout] .ca-stage { display: flex; flex-direction: column; width: calc(100% - (2 * var(--mobile-gutter))); max-width: 720px; flex: 1 1 0; min-height: 0; overflow: hidden; }
  html[data-wise-mobile-layout] .ca-stage:is(.ca-stage-contained, .ca-stage-compact) { width: calc(100% - (2 * var(--mobile-gutter))); max-width: 600px; }
  html[data-wise-mobile-layout] .ca-stage .ca-heading { flex: 0 0 auto; margin: 12px 0; font-size: 25px; line-height: 30px; transform: none; }
  html[data-wise-mobile-layout] .ca-stage .ca-lede { flex: 0 0 auto; margin: 0 0 12px; font-size: 14px; line-height: 20px; }
  html[data-wise-mobile-layout] .ca-form { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
  html[data-wise-mobile-layout] .ca-grid, html[data-wise-mobile-layout] .ca-summary { flex: 1 1 0; min-height: 0; padding: 2px; overflow-x: hidden; overflow-y: auto; align-content: start; gap: 10px; overscroll-behavior-y: contain; }
  html[data-wise-mobile-layout] .ca-grid { grid-template-columns: minmax(0, 1fr); }
  html[data-wise-mobile-layout] body.ca-body .ca-stage[data-step="3"] .ca-grid { gap: 8px; }
  html[data-wise-mobile-layout] body.ca-body .ca-stage[data-step="3"] .ca-form {
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2px;
    overscroll-behavior-y: contain;
  }
  html[data-wise-mobile-layout] body.ca-body .ca-stage[data-step="3"] .ca-grid {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
    padding: 0;
  }
  html[data-wise-mobile-layout] .ca-field input, html[data-wise-mobile-layout] .ca-field select { height: 54px; border-radius: 10px; padding: 17px 14px 0; }
  html[data-wise-mobile-layout] .ca-field select { height: 60px; padding: 27px 38px 5px 14px; line-height: 20px; }
  html[data-wise-mobile-layout] .ca-field label:not(.ca-choice) { height: 54px; padding: 8px 14px; font-size: 14px; line-height: 19px; }
  html[data-wise-mobile-layout] .ca-field input:not(:placeholder-shown) + label,
  html[data-wise-mobile-layout] .ca-field input:focus + label { height: 26px; padding-top: 4px; font-size: 11px; line-height: 14px; }
  html[data-wise-mobile-layout] .ca-field select + label:not(.ca-choice) { height: 30px; padding: 5px 14px 0; font-size: 10px; line-height: 14px; }
  html[data-wise-mobile-layout] .ca-field select { background-position: calc(100% - 22px) 28px, calc(100% - 16px) 28px; }
  html[data-wise-mobile-layout] .ca-stage[data-step="2"] .ca-grid > .ca-field { transform: none; }
  html[data-wise-mobile-layout] .ca-choice-group { gap: 8px; }
  html[data-wise-mobile-layout] .ca-field label.ca-choice { min-height: 48px; padding: 10px; font-size: 15px; line-height: 20px; }
  html[data-wise-mobile-layout] .ca-actions { width: 100%; max-width: 100%; flex: 0 0 auto; flex-direction: row; gap: 8px; margin: 10px 0 4px; box-sizing: border-box; }
  html[data-wise-mobile-layout] :is(.ca-primary, .ca-secondary), html[data-wise-mobile-layout] .ca-stage[data-step="2"] .ca-secondary { min-width: 0; min-height: 48px; padding: 11px 14px; }
  html[data-wise-mobile-layout] .ca-actions .ca-secondary { flex: 0 0 auto; width: auto; max-width: 100%; white-space: nowrap !important; overflow-wrap: normal !important; word-break: normal !important; }
  html[data-wise-mobile-layout] .ca-actions .ca-primary { flex: 1 1 auto; width: auto; max-width: 100%; overflow-wrap: break-word !important; word-break: normal !important; }
  html[data-wise-mobile-layout] .ca-stage[data-step="2"] .ca-actions { flex-direction: column-reverse; gap: 8px; }
  html[data-wise-mobile-layout] .ca-stage[data-step="2"] .ca-primary { flex: 0 0 auto; width: 100%; }
  html[data-wise-mobile-layout] .ca-stage[data-step="2"] .ca-secondary { width: 100%; }
  html[data-wise-mobile-layout] .ca-check-row { flex: 0 0 auto; gap: 10px; margin: 10px 0; font-size: 13px; line-height: 19px; }
  html[data-wise-mobile-layout] .ca-review-box { flex: 0 0 auto; margin-top: 8px; padding: 10px; }
  html[data-wise-mobile-layout] .ca-review-box .ca-check-row { margin: 0; }
  html[data-wise-mobile-layout] .ca-amount-note { flex: 0 0 auto; margin: 0 0 8px; }
  html[data-wise-mobile-layout]:has(body.ca-body:has(.ca-summary)) { height: auto !important; min-height: 100% !important; overflow-x: hidden !important; overflow-y: auto !important; }
  html[data-wise-mobile-layout] body.ca-body:has(.ca-summary) { height: auto !important; min-height: var(--mobile-screen) !important; overflow-x: hidden !important; overflow-y: visible !important; }
  html[data-wise-mobile-layout] body.ca-body:has(.ca-summary) :is(.ca-main, .ca-stage, .ca-form) { flex: 0 0 auto !important; min-height: auto !important; overflow: visible !important; }
  html[data-wise-mobile-layout] .ca-summary-row { flex-wrap: wrap; padding: 8px 10px; font-size: 13px; gap: 4px 10px; align-items: baseline; }
  html[data-wise-mobile-layout] .ca-summary-row > span { flex: 0 1 auto; white-space: nowrap; }
  html[data-wise-mobile-layout] .ca-summary-row > strong { max-width: 100%; min-width: 0; flex: 1 1 170px; text-align: right; font-size: 13px; overflow-wrap: break-word !important; word-break: normal !important; }
  html[data-wise-mobile-layout] .ca-stage:has(.ca-summary) .ca-heading { margin: 8px 0 6px; font-size: clamp(22px, 5.8vw, 26px); line-height: 1.1; }
  html[data-wise-mobile-layout] .ca-stage:has(.ca-summary) .ca-lede { margin: 0 0 8px; font-size: 13.5px; line-height: 18px; }
  html[data-wise-mobile-layout] .ca-stage:has(.ca-summary) .ca-amount-note { margin: 0 0 8px; font-size: 13px; line-height: 18px; }
  html[data-wise-mobile-layout] .ca-stage:has(.ca-summary) .ca-form { overflow: visible; }
  html[data-wise-mobile-layout] .ca-stage:has(.ca-summary) .ca-summary { flex: 0 0 auto; overflow: visible; gap: 0; padding: 0; }
  html[data-wise-mobile-layout] .ca-stage:has(.ca-summary) .ca-summary-row { padding: 7px 10px; font-size: 12.5px; line-height: 17px; gap: 4px 10px; }
  html[data-wise-mobile-layout] .ca-stage:has(.ca-summary) .ca-review-box { margin-top: 10px; padding: 9px 10px; }
  html[data-wise-mobile-layout] .ca-stage:has(.ca-summary) .ca-review-box .ca-check-row { font-size: 12.5px; line-height: 17px; }
  html[data-wise-mobile-layout] .ca-stage:has(.ca-summary) .ca-actions { margin: 10px 0 6px; }
  html[data-wise-mobile-layout] .ca-stage:has(.ca-summary) :is(.ca-primary, .ca-secondary) { min-height: 46px; padding: 10px 14px; font-size: 14px; line-height: 18px; }
  html[data-wise-mobile-layout] .ca-footer, html[data-wise-mobile-layout] .ca-body:not([data-ca-step="1"]) .ca-footer,
  html[data-wise-mobile-layout] .ca-body[data-ca-step="1"] .ca-footer { height: auto; flex: 0 0 auto; padding: 4px var(--mobile-gutter) calc(4px + var(--mobile-bottom)); }
  html[data-wise-mobile-layout] .ca-footer-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; height: auto; padding: 0; }
  html[data-wise-mobile-layout] .ca-footer-company, html[data-wise-mobile-layout] .ca-footer-links { position: static; font-size: 11px; line-height: 16px; }
  html[data-wise-mobile-layout] .ca-footer-links { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  html[data-wise-mobile-layout] .ca-footer a { min-height: 28px; gap: 6px; font-size: 12px; line-height: 18px; }
  html[data-wise-mobile-layout] .ca-footer a svg { width: 16px; height: 16px; }
  html[data-wise-mobile-layout] .ca-footer-help { position: static; width: auto; height: auto; min-height: 32px; padding: 2px 10px; font-size: 12px; border-width: 2px; }
  html[data-wise-mobile-layout] .ca-suggestions { top: calc(8px + var(--mobile-top)); right: 12px; width: 40px; height: 38px; border-radius: 10px; padding: 6px; }
  html[data-wise-mobile-layout] .ca-suggestions span { display: none; }

  /* Financial screens: short states fit. Long contract/terms content keeps the
     document as its scroll container so disclosures and actions are not trapped
     inside a nested card. */
  html[data-wise-mobile-layout]:has(body.application-flow-ui.is-approval-summary) { height: auto !important; min-height: 100% !important; overflow-x: hidden !important; overflow-y: auto !important; }
  /* Operational upsells can contain terms, provider instructions and consent.
     Keep the page scrollable instead of trapping those controls in the card. */
  html[data-wise-mobile-layout]:has(body.upsell-operational-page) { height: auto !important; min-height: 100% !important; overflow-x: hidden !important; overflow-y: auto !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page { height: auto !important; min-height: 100dvh !important; overflow-x: hidden !important; overflow-y: visible !important; font-family: var(--wise-font-ui, 'Wise Inter', Inter, Arial, sans-serif) !important; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
  html[data-wise-mobile-layout] body.upsell-operational-page .wrap { display: flex !important; flex-direction: column !important; justify-content: flex-start !important; width: 100% !important; height: auto !important; min-height: var(--mobile-screen) !important; max-width: 620px !important; margin: 0 auto !important; padding: max(10px, var(--mobile-top)) var(--mobile-gutter) max(12px, calc(10px + var(--mobile-bottom))) !important; overflow: visible !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .wrap > .topbar { flex: 0 0 auto !important; min-height: clamp(26px, 6.5vw, 34px) !important; height: auto !important; margin: 0 0 clamp(6px, 2vw, 10px) !important; width: 100% !important; padding: 2px !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-card { display: flex !important; flex-direction: column !important; flex: 1 0 auto !important; min-height: 0 !important; height: auto !important; max-height: none !important; margin: 0 !important; padding: clamp(14px, 4vw, 24px) clamp(12px, 3.8vw, 22px) !important; border-radius: clamp(18px, 4.8vw, 26px) !important; overflow: visible !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-progress { margin-bottom: 10px !important; font-size: 11px !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-icon { width: clamp(42px, 11vw, 52px) !important; height: clamp(42px, 11vw, 52px) !important; margin: 0 auto clamp(8px, 2.4vw, 12px) !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-title { margin: 0 !important; font-family: var(--wise-font-display, 'Wise Inter', Inter, sans-serif) !important; font-size: clamp(21px, 5.4vw, 31px) !important; font-weight: 700 !important; line-height: 1.12 !important; letter-spacing: -.024em !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-lead { margin: clamp(9px, 2.5vw, 12px) 0 clamp(11px, 3vw, 14px) !important; font-size: clamp(13.5px, 3.6vw, 14.8px) !important; line-height: 1.54 !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page :is(.upsell-operational-amount, .upsell-operational-account, .upsell-operational-terms, .upsell-operational-status, .upsell-operational-details) { margin-bottom: clamp(10px, 2.8vw, 14px) !important; padding: clamp(11px, 3.2vw, 15px) !important; border-radius: clamp(14px, 3.8vw, 18px) !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-amount strong { font-family: var(--wise-font-display, 'Wise Inter', Inter, sans-serif) !important; font-size: clamp(26px, 7vw, 33px) !important; font-weight: 750 !important; letter-spacing: -.02em !important; font-variant-numeric: tabular-nums; }
  html[data-wise-mobile-layout] body.upsell-operational-page :is(.upsell-operational-status, .upsell-operational-terms p, .upsell-operational-muted) { font-size: clamp(12.5px, 3.4vw, 13.5px) !important; line-height: 1.48 !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-button { min-height: 46px !important; height: auto !important; margin: 6px 0 0 !important; padding: 11px 16px !important; font-family: var(--wise-font-ui, 'Wise Inter', Inter, sans-serif) !important; font-size: clamp(14px, 3.8vw, 15.5px) !important; line-height: 1.35 !important; }
  html[data-wise-mobile-layout] body.contract-preview-page:not(.contract-stage-four) { height: auto !important; min-height: var(--mobile-screen) !important; overflow-x: hidden !important; overflow-y: auto !important; font-family: var(--wise-font-ui, 'Wise Inter', Inter, Arial, sans-serif) !important; }
  html[data-wise-mobile-layout] body.contract-preview-page:not(.contract-stage-four) .contract-shell { display: flex !important; flex-direction: column !important; justify-content: flex-start !important; width: 100% !important; height: auto !important; min-height: var(--mobile-screen) !important; max-width: 620px !important; padding: max(10px, var(--mobile-top)) var(--mobile-gutter) max(12px, calc(10px + var(--mobile-bottom))) !important; overflow: visible !important; }
  html[data-wise-mobile-layout] body.contract-preview-page:not(.contract-stage-four) .contract-brand { flex: 0 0 auto !important; width: 100% !important; margin: 0 0 clamp(6px, 2vw, 12px) !important; padding: 2px !important; }
  html[data-wise-mobile-layout] body.contract-preview-page:not(.contract-stage-four) .contract-card { display: flex !important; flex-direction: column !important; justify-content: flex-start !important; flex: 1 0 auto !important; width: 100% !important; min-height: 0 !important; padding: clamp(14px, 4vw, 22px) clamp(12px, 3.8vw, 20px) !important; overflow: visible !important; }
  html[data-wise-mobile-layout] body.contract-preview-page:not(.contract-stage-four) .contract-card > .contract-next { margin-top: auto !important; }
  html[data-wise-mobile-layout] body.contract-preview-page:not(.contract-stage-four) .contract-progress { margin-bottom: 14px !important; }
  html[data-wise-mobile-layout] body.contract-preview-page:not(.contract-stage-four) .contract-copy { margin: 10px 0 14px !important; }
  html[data-wise-mobile-layout] body.contract-preview-page:not(.contract-stage-four) .contract-next { min-height: 48px !important; padding: 11px 16px !important; }

  /* Stage 4 is a long operational document. Do not create a second scroll
     viewport inside .contract-card: the browser page must expose the full
     provider instructions, payer details and actions on mobile and tablet. */
  html[data-wise-mobile-layout]:has(body.contract-preview-page.contract-stage-four) { height: auto !important; min-height: 100% !important; overflow-x: hidden !important; overflow-y: auto !important; }
  html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four { height: auto !important; min-height: 100dvh !important; overflow-x: hidden !important; overflow-y: visible !important; }
  html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-shell { display: block !important; width: 100% !important; height: auto !important; min-height: 100dvh !important; max-width: 720px !important; padding: calc(18px + var(--mobile-top)) var(--mobile-gutter) calc(24px + var(--mobile-bottom)) !important; overflow: visible !important; }
  html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-brand { display: flex !important; flex: none !important; margin-bottom: 14px !important; }
  html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-card { display: block !important; flex: none !important; width: 100% !important; height: auto !important; min-height: 0 !important; max-height: none !important; padding: 16px !important; overflow: visible !important; }
  html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-next { min-height: 48px !important; margin-top: 12px !important; }

  /* 641–900px is tablet territory, not desktop: keep the dark composition but
     reduce the large stage-four scale so the first view is readable. */
  @media (min-width: 641px) and (max-width: 900px) {
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-shell { max-width: 820px !important; padding-inline: 28px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-brand { gap: 10px !important; margin-bottom: 18px !important; font-size: 16px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-brand img { height: 30px !important; max-width: 128px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-paper-emoji { padding-left: 12px !important; font-size: 24px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-card { padding: 22px 24px 24px !important; border-radius: 26px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-progress { gap: 8px !important; margin-bottom: 25px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-progress span { width: 40px !important; height: 40px !important; font-size: 15px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-card h1 { font-size: clamp(30px, 4.2vw, 36px) !important; line-height: 1.08 !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-kicker { margin-bottom: 14px !important; font-size: 14px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-copy { margin: 14px 0 22px !important; font-size: 16px !important; line-height: 1.5 !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-condition { padding: 19px 20px !important; border-radius: 20px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-condition h2 { font-size: 20px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-condition p { font-size: 16px !important; line-height: 1.5 !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-payment-area { gap: 14px !important; margin-top: 18px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-payment-summary,
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-payment-status-card { padding: 18px 20px !important; border-radius: 21px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-payment-summary h2,
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-payment-status-card h2 { font-size: 18px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-transfer-card { padding: 18px 20px !important; border-radius: 21px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-transfer-header strong { font-size: 19px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-transfer-header>div:last-child>span { font-size: 14px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-transfer-card .contract-stripe-field { min-height: 50px !important; font-size: 15px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-transfer-card .contract-stripe-field strong,
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-transfer-card .contract-stripe-field code { font-size: 16px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-payment-note { padding: 15px 18px !important; font-size: 15px !important; }
    html[data-wise-mobile-layout] body.contract-preview-page.contract-stage-four .contract-next { min-height: 56px !important; font-size: 17px !important; }
  }

  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary { display: flex !important; flex-direction: column !important; min-height: var(--mobile-screen) !important; height: auto !important; padding-bottom: 16px !important; overflow-x: hidden !important; overflow-y: auto !important; }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary > .wrap { display: flex !important; flex-direction: column !important; flex: 1 1 auto !important; min-height: 0 !important; height: auto !important; padding: 0 !important; overflow: visible !important; }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .topbar { flex: 0 0 auto; height: auto; min-height: 54px; padding: calc(8px + var(--mobile-top)) var(--mobile-gutter) 8px; }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .flow-status-page { flex: 1 1 auto; min-height: 0; padding: 12px var(--mobile-gutter) 14px !important; overflow: visible; }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .application-status-art { width: 104px !important; height: 104px !important; margin: 0 auto 4px !important; }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .approval-amount-card { margin-top: 12px; padding: 14px; }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .approval-stats > section { padding: 12px; }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .approval-first-payment { margin-top: 10px; padding: 12px; }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .approval-actions { position: relative; inset: auto; flex: 0 0 auto; padding: 8px var(--mobile-gutter) calc(8px + var(--mobile-bottom)); }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .approval-actions button { min-height: 48px !important; padding: 10px 16px !important; }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .approval-actions p { margin-top: 6px; }
  html[data-wise-mobile-layout] #identitySheet { max-height: calc(var(--mobile-screen) - 12px) !important; overflow-y: auto !important; padding-bottom: max(16px, var(--mobile-bottom)); }
  html[data-wise-mobile-layout] body.guided-chat { height: var(--mobile-screen) !important; min-height: 0 !important; }
  html[data-wise-mobile-layout] body.guided-chat .chat-card { height: var(--mobile-screen) !important; min-height: 0 !important; }
  html[data-wise-mobile-layout] :is(.flow-route-loading, .ca-finish-loading) { box-sizing: border-box; padding-top: max(20px, var(--mobile-top)); padding-bottom: max(20px, var(--mobile-bottom)); }
}

html[data-wise-mobile-layout] body.application-flow-ui.is-credit-analysis[data-spei-page="video"] .status-badge{display:none!important}
html[data-wise-mobile-layout] body.application-flow-ui.is-credit-analysis[data-spei-page="video"] .header{position:relative!important;inset:auto!important;height:auto!important;min-height:64px!important;flex:none!important}
html[data-wise-mobile-layout] body.application-flow-ui.is-credit-analysis[data-spei-page="video"] .header-content{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;min-height:64px!important;height:auto!important;width:100%!important;max-width:600px!important;margin:auto!important;padding:12px 20px!important}
html[data-wise-mobile-layout] body.application-flow-ui.is-credit-analysis[data-spei-page="video"] .header-right{min-width:0!important;max-width:50%!important}
html[data-wise-mobile-layout] body.application-flow-ui.is-credit-analysis[data-spei-page="video"] .user-name{display:block;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-wise-mobile-layout] body.application-flow-ui.is-credit-analysis[data-spei-page="video"] .main-container{padding-top:0!important;min-height:0!important}
html[data-wise-mobile-layout] body.application-flow-ui.is-credit-analysis[data-spei-page="video"] .main-container>.container{padding-top:16px!important}

@media (max-width: 360px) {
  html[data-wise-mobile-layout] body.ca-body .ca-stage[data-step="3"] .ca-grid { gap: 6px; }
}

/* Shared mobile guardrails. This is deliberately layout-only: it gives every
   route the same readable rhythm and prevents legacy transforms/long labels
   from escaping the safe inline area. Route-specific rules above still own
   which region is allowed to scroll. */
@media (max-width: 900px), (max-height: 500px) and (pointer: coarse) {
  html[data-wise-mobile-layout] :is(.btn-next, .btn-voltar, .btn-submit, .btn-continue, .btn-primary, .btn-cta, .ca-primary, .ca-secondary, .pq-next, .pq-back, .application-button, .upsell-operational-button, .contract-next) {
    box-sizing: border-box !important;
    min-height: var(--mobile-control-height) !important;
    max-width: 100% !important;
    padding-inline: clamp(12px, 4vw, 20px) !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }
  html[data-wise-mobile-layout] :is(.pq-card, .ca-summary, .ca-review-box, .info-box, .approval-amount-card, .approval-stats > section, .approval-first-payment, .upsell-operational-card, .contract-card) {
    min-width: 0 !important;
    max-width: 100% !important;
    border-radius: var(--mobile-card-radius) !important;
    overflow-wrap: break-word;
  }
  html[data-wise-mobile-layout] :is(.pq-card, .ca-summary, .ca-review-box, .info-box, .approval-amount-card, .approval-stats > section, .approval-first-payment, .upsell-operational-card, .contract-card) :is(img, svg) {
    max-width: 100%;
  }

  /* Citi's desktop logo intentionally used a negative optical offset and
     horizontal scale. On a narrow header that transform crossed the safe
     area, even though document.scrollWidth stayed equal to the viewport. */
  html[data-wise-mobile-layout] body.ca-body .ca-header-inner {
    width: 100% !important;
    min-width: 0 !important;
    padding-inline: var(--mobile-gutter) !important;
  }
  html[data-wise-mobile-layout] body.ca-body .ca-brand {
    width: min(133px, 100%) !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  html[data-wise-mobile-layout] body.ca-body .ca-brand img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 17px !important;
    margin-left: 0 !important;
    transform: translateY(-1px) !important;
    object-fit: contain !important;
  }

  /* Long labels and values should wrap inside the card instead of widening
     the page or pushing a CTA beyond the viewport. */
  html[data-wise-mobile-layout] :is(.ca-summary-row, .ca-choice, .ca-check-row, .flow-option, .opt, .approval-stats > section, .account-summary-row, .contract-row) {
    min-width: 0 !important;
  }
  html[data-wise-mobile-layout] :is(.ca-summary-row, .ca-choice, .ca-check-row, .flow-option, .opt, .approval-stats > section, .account-summary-row, .contract-row) > :is(span, strong, p, div) {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
  }
}

@media (max-width: 900px) and (max-height: 500px) {
  html[data-wise-mobile-layout] {
    --mobile-control-height: 44px;
    --mobile-card-radius: 18px;
  }
  html[data-wise-mobile-layout] :is(.btn-next, .btn-voltar, .btn-submit, .btn-continue, .btn-primary, .btn-cta, .ca-primary, .ca-secondary, .pq-next, .pq-back, .application-button, .upsell-operational-button, .contract-next) {
    padding-inline: 12px !important;
  }
}

/* In landscape the available height is smaller, so keep all income bands
   reachable inside the list without pushing the action bar out of view. */
@media (max-width: 900px) and (max-height: 500px) {
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/5.html"] #rendaOptions {
    max-height: min(432px, calc(var(--mobile-screen) - 170px)) !important;
  }
}

/* App shell for the five selection questions: the action row owns the bottom
   safe area and the answer collection is the only flexible scroll region. */
@media (max-width: 900px) {
  html[data-wise-mobile-layout]:has(body.flow-step-ui.wq-page:not(.wq-bridge)) {
    height: 100% !important;
    overflow: hidden !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) {
    display: flex !important;
    flex-direction: column !important;
    height: var(--mobile-screen) !important;
    min-height: 0 !important;
    max-height: var(--mobile-screen) !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .header {
    flex: 0 0 auto !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .flow-progress-shell {
    flex: 0 0 auto !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .container {
    display: flex !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .container > .card {
    display: flex !important;
    flex: 1 1 0 !important;
    flex-direction: column !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card > :is(.grid, .list) {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    align-content: start !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .actions {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 7px var(--mobile-gutter) calc(7px + var(--mobile-bottom)) !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .cf-foot {
    display: none !important;
  }
}

/* Higher specificity than the legacy desktop fixed-track rule, which is
   loaded before this layer and otherwise crosses the progress label. */
@media (max-width: 900px), (max-height: 500px) and (pointer: coarse) {
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page .flow-progress-track,
  html[data-wise-mobile-layout] body.flow-step-ui.funnel-ca .flow-progress-track {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: 100% !important;
    margin-top: 6px !important;
  }
}

/* Keep the step label and progress track in normal flow on small screens.
   The legacy fixed track at top:65px crossed the “Paso X de 8” label when the
   compact header was 55px high. */
@media (max-width: 900px), (max-height: 500px) and (pointer: coarse) {
  html[data-wise-mobile-layout] body.flow-step-ui .flow-progress-shell {
    position: relative !important;
    width: calc(100% - 24px) !important;
    margin: 5px auto 8px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui .flow-progress-track {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    margin-top: 6px !important;
  }
}

/* Extra-small portrait devices: keep the complete choice set above the
   action bar instead of creating a clipped/partially hidden grid. */
@media (max-width: 340px) and (min-height: 500px) {
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) {
    padding-bottom: 0 !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .actions {
    margin-top: 6px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .actions {
    padding: 5px 8px calc(4px + var(--mobile-bottom)) !important;
    gap: 4px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .actions :is(.btn-next, .btn-voltar) {
    min-height: 44px !important;
    padding-block: 8px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .actions .flow-privacy-note {
    font-size: 10px !important;
    line-height: 14px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card .grid > .opt {
    min-height: 62px !important;
    height: auto !important;
    padding: 8px !important;
    gap: 6px !important;
    border-radius: 16px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card .grid > .opt > svg {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    flex-basis: 30px !important;
    padding: 6px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card .grid > .opt > span {
    font-size: 13px !important;
    line-height: 17px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge):is([data-demo-route="/4.html"], [data-demo-route="/6.html"]) .card .list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge):is([data-demo-route="/4.html"], [data-demo-route="/6.html"]) .card .list > .opt {
    min-height: 48px !important;
    padding: 7px !important;
    border-radius: 14px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/7.html"] .card > .list.wq-credit {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/7.html"] .card > .list.wq-credit > .opt {
    height: 84px !important;
    min-height: 84px !important;
    max-height: 84px !important;
    padding: 8px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/7.html"] .card > .list.wq-credit {
    align-content: start !important;
    grid-auto-rows: 84px !important;
  }
}

/* Landscape uses useful columns, not a scaled-down portrait page. */
@media (min-width: 541px) and (max-width: 900px) and (max-height: 500px) {
  html[data-wise-mobile-layout] body.flow-step-ui .header .header-content { height: 44px !important; min-height: 44px !important; padding-block: 4px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card :is(h1.title, h1) { font-size: 24px !important; margin-top: 2px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card p.subtitle { margin: 3px 0 7px !important; font-size: 14px !important; line-height: 19px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card .grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) .card .grid > .opt { min-height: 76px !important; padding: 9px !important; gap: 7px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge):is([data-demo-route="/4.html"], [data-demo-route="/6.html"]) .card .list { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/7.html"] .card > .list.wq-credit { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge)[data-demo-route="/7.html"] .card > .list.wq-credit > .opt { flex-direction: column !important; align-items: flex-start !important; min-height: 130px !important; gap: 6px !important; padding: 10px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .actions { padding-block: 5px !important; }
  html[data-wise-mobile-layout] body.flow-step-ui.wq-page:not(.wq-bridge) > .actions :is(.btn-next, .btn-voltar) { min-height: 44px !important; }
  html[data-wise-mobile-layout] .pq-header { padding-block: 6px; }
  html[data-wise-mobile-layout] .pq-card { padding: 12px; }
  html[data-wise-mobile-layout] .pq-progress { margin-bottom: 6px; }
  html[data-wise-mobile-layout] .pq-counter { margin-bottom: 5px; font-size: 11px; }
  html[data-wise-mobile-layout] .pq-step:not([hidden]) { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); grid-template-rows: min-content 1fr; column-gap: 16px; }
  html[data-wise-mobile-layout] .pq-step h1 { grid-column: 1; font-size: 24px; }
  html[data-wise-mobile-layout] .pq-subtitle { grid-column: 1; margin: 6px 0; font-size: 14px; }
  html[data-wise-mobile-layout] .pq-options { grid-column: 2; grid-row: 1 / 3; overflow-y: auto; max-height: calc(var(--mobile-screen) - 120px); align-content: start; }
  html[data-wise-mobile-layout] .pq-note { font-size: 11px; line-height: 15px; margin-top: 6px; }
  html[data-wise-mobile-layout] .pq-actions { margin-top: 6px; }
  html[data-wise-mobile-layout] :is(.pq-next, .pq-back) { min-height: 44px; padding-block: 8px; }
  html[data-wise-mobile-layout] .ca-stage .ca-heading { margin: 6px 0; font-size: 22px; line-height: 26px; }
  html[data-wise-mobile-layout] .ca-stage .ca-lede { margin-bottom: 6px; }
  html[data-wise-mobile-layout] .ca-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-wise-mobile-layout] .ca-footer-links { grid-column: auto; }
  html[data-wise-mobile-layout] .ca-actions { margin-top: 6px; }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .application-status-art { width: 64px !important; height: 64px !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .wrap { min-height: auto !important; padding-block: 8px max(12px, var(--mobile-bottom)) !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .wrap > .topbar { min-height: 24px !important; margin-bottom: 6px !important; padding-block: 2px !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .wrap > .topbar img { height: 20px !important; max-width: 86px !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-card { flex: 0 0 auto !important; margin-top: 0 !important; padding: 13px 14px !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-icon { width: 36px !important; height: 36px !important; margin: 0 auto 5px !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-icon svg { width: 20px !important; height: 20px !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-title { margin-bottom: 4px !important; font-size: 21px !important; font-weight: 700 !important; letter-spacing: -.022em !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-state { margin-top: 3px !important; font-size: 10.5px !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page :is(.upsell-operational-lead, .upsell-operational-explanation) { margin-block: 6px 8px !important; font-size: 12.5px !important; line-height: 1.4 !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page :is(.upsell-operational-amount, .upsell-operational-terms, .upsell-operational-status, .upsell-operational-details) { margin-bottom: 8px !important; padding: 9px !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-amount strong { font-size: 25px !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-account { margin-bottom: 8px !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page :is(.upsell-operational-terms p, .upsell-operational-consent, .upsell-operational-status, .upsell-operational-muted) { font-size: 12px !important; line-height: 1.38 !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .contract-opening-fee-meta > div { padding-block: 4px !important; }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-button { min-height: 44px !important; padding: 9px 14px !important; font-size: 13px !important; line-height: 1.3 !important; }
}

/* Identity step: do not vertically center the whole card on a phone. The
   header/progress stay near the top and the form owns the remaining space,
   avoiding the large blank band seen between “Paso 1” and the indicators. */
@media (max-width: 900px), (max-height: 500px) and (pointer: coarse) {
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/2.html"] > .container {
    justify-content: flex-start !important;
    padding-top: 10px !important;
    padding-bottom: calc(12px + var(--mobile-bottom)) !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/2.html"] .container > .card {
    margin-top: 0 !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/2.html"] .step-indicators {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/2.html"] .progress-bar {
    margin-top: 4px !important;
    margin-bottom: 18px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/2.html"] .step-header {
    margin-bottom: 8px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/2.html"] .step-subtitle {
    margin: 6px 0 14px !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/2.html"] > .container > .card {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/2.html"] > .container > .card > .step[style*="display: block"] {
    display: flex !important;
    flex: 0 1 auto !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }
  html[data-wise-mobile-layout] body.flow-step-ui[data-demo-route="/2.html"] > .container > .card > .step[style*="display: block"] .trust-bar {
    margin-top: clamp(12px, 2.4vh, 18px) !important;
  }
}

/* Contract text grows naturally on narrow and short phone screens. */
@media (max-width: 900px) {
  html[data-wise-mobile-layout]:has(body[data-spei-page="upsell"]) {
    height: auto !important;
    overflow-y: auto !important;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) {
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) .wrap.contract-shell {
    width: 100% !important;
    max-width: 620px !important;
    height: auto !important;
    min-height: var(--mobile-screen) !important;
    justify-content: flex-start !important;
    padding: max(10px, var(--mobile-top)) var(--mobile-gutter) max(12px, calc(10px + var(--mobile-bottom))) !important;
    overflow: visible !important;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) .wrap > .card.contract-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    flex: 1 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: clamp(14px, 4vw, 22px) clamp(12px, 3.8vw, 20px) !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) .contract-opening-title {
    font-family: var(--wise-font-display, 'Wise Inter', Inter, sans-serif) !important;
    font-size: clamp(21px, 5.4vw, 31px) !important;
    font-weight: 700 !important;
    line-height: 1.12 !important;
    letter-spacing: -.024em !important;
    overflow-wrap: anywhere;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) :is(.contract-opening-lead, .contract-opening-explanation, .contract-opening-list li, .contract-stage-account-info) {
    font-size: clamp(13.5px, 3.6vw, 14.8px) !important;
    line-height: 1.52 !important;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) :is(.contract-terms-card, .contract-stage-payment) {
    min-width: 0;
    padding: clamp(11px, 3.2vw, 14px) !important;
    margin-bottom: clamp(10px, 2.8vw, 14px) !important;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) :is(.contract-terms-heading, .contract-opening-fee-label, .contract-opening-fee-clabe-label) {
    font-size: clamp(10.5px, 2.8vw, 12px) !important;
    line-height: 1.35 !important;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) :is(.contract-terms-card, .contract-stage-payment) .contract-opening-fee-copy {
    font-size: clamp(12.5px, 3.4vw, 13.5px) !important;
    line-height: 1.48 !important;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) .contract-opening-fee-meta > div {
    gap: 8px !important;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 7px 0 !important;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) .contract-opening-fee-meta :is(dt, dd) {
    min-width: 0;
    max-width: 100%;
    font-size: clamp(11.5px, 3.1vw, 12.5px) !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) :is(.contract-next, .upsell-operational-button) {
    min-height: 46px !important;
    height: auto !important;
    padding: 11px 16px !important;
    font-family: var(--wise-font-ui, 'Wise Inter', Inter, sans-serif) !important;
    font-size: clamp(14px, 3.8vw, 15.5px) !important;
    line-height: 1.35 !important;
    white-space: normal !important;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) .contract-opening-copy {
    width: auto !important;
    max-width: 100% !important;
    min-height: 34px !important;
    height: auto !important;
    padding: 7px 10px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) .contract-stage-payment .contract-opening-fee-clabe code {
    font-size: 16px !important;
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) .contract-stage-payment .contract-opening-fee-clabe {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) .contract-opening-fee-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) :is(.contract-opening-copy-feedback, .contract-opening-fee-warning) {
    font-size: 12px !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.contract-opening-preview.upsell-single-screen, .upsell-operational-page) .contract-stage-payment .contract-opening-fee-meta dd {
    flex: 1 1 100px;
    margin: 0 !important;
  }
}

/* Soft-keyboard & tight portrait height protection across form screens:
   never crush inputs inside nested flex boxes or lose the active field offscreen. */
@media (max-width: 540px) and (max-height: 560px) {
  html[data-wise-mobile-layout]:has(body.ca-body) { height: auto !important; min-height: 100% !important; overflow-x: clip !important; overflow-y: auto !important; }
  html[data-wise-mobile-layout] body.ca-body { height: auto !important; min-height: var(--mobile-screen) !important; max-height: none !important; overflow-x: clip !important; overflow-y: visible !important; }
  html[data-wise-mobile-layout] .ca-main { flex: 0 0 auto !important; min-height: auto !important; overflow: visible !important; padding-bottom: 12px !important; }
  html[data-wise-mobile-layout] .ca-stage { flex: 0 0 auto !important; min-height: auto !important; overflow: visible !important; }
  html[data-wise-mobile-layout] .ca-form,
  html[data-wise-mobile-layout] body.ca-body .ca-stage[data-step="3"] .ca-form { flex: 0 0 auto !important; min-height: auto !important; overflow: visible !important; }
  html[data-wise-mobile-layout] .ca-grid,
  html[data-wise-mobile-layout] .ca-summary { flex: 0 0 auto !important; min-height: auto !important; overflow: visible !important; grid-template-columns: minmax(0, 1fr) !important; gap: 10px !important; }
}

@media (max-width: 900px), (max-height: 500px) and (pointer: coarse) {
  html[data-wise-mobile-layout][data-wise-keyboard]:has(body.ca-body),
  html[data-wise-mobile-layout][data-wise-keyboard]:has(body.flow-step-ui:is([data-demo-route="/2.html"], [data-demo-route="/5.html"], [data-demo-route="/8.html"])) {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: clip !important;
    overflow-y: auto !important;
  }

  /* Citi steps (0..10) with soft keyboard open */
  html[data-wise-mobile-layout][data-wise-keyboard] body.ca-body {
    height: auto !important;
    min-height: var(--mobile-screen) !important;
    max-height: none !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-header {
    height: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    padding: calc(5px + var(--mobile-top)) 0 5px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-brand,
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-brand img {
    width: min(116px, 100%) !important;
    height: 16px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-progress {
    width: calc(100% - 24px) !important;
    margin: 4px auto 0 !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-progress-copy {
    margin-bottom: 4px !important;
    font-size: 11px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-main {
    flex: 0 0 auto !important;
    min-height: auto !important;
    overflow: visible !important;
    padding-bottom: 12px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-stage,
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-stage:is(.ca-stage-contained, .ca-stage-compact) {
    flex: 0 0 auto !important;
    width: calc(100% - 32px) !important;
    max-width: 600px !important;
    min-height: auto !important;
    overflow: visible !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-stage .ca-heading {
    margin: 6px 0 !important;
    font-size: 20px !important;
    line-height: 25px !important;
    transform: none !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-stage .ca-lede {
    margin: 0 0 10px !important;
    font-size: 13px !important;
    line-height: 18px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-form,
  html[data-wise-mobile-layout][data-wise-keyboard] body.ca-body .ca-stage[data-step="3"] .ca-form {
    flex: 0 0 auto !important;
    min-height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-grid,
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-summary {
    flex: 0 0 auto !important;
    min-height: auto !important;
    overflow: visible !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.ca-body .ca-stage[data-step="2"] .ca-grid > .ca-field:first-child,
  html[data-wise-mobile-layout][data-wise-keyboard] body.ca-body .ca-stage[data-step="2"] .ca-field-copy {
    transform: none !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-field input,
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-field select {
    height: 52px !important;
    min-height: 52px !important;
    padding: 17px 14px 0 !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-field label {
    height: 52px !important;
    padding: 14px !important;
    font-size: 15px !important;
    line-height: 20px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-field--tall input,
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-field--tall label {
    height: 62px !important;
    min-height: 62px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-field input:not(:placeholder-shown) + label,
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-field input:focus + label,
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-field select + label {
    height: 24px !important;
    min-height: 0 !important;
    padding: 5px 14px 0 !important;
    font-size: 11px !important;
    line-height: 14px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-check-row {
    margin: 12px 0 6px !important;
    font-size: 13.5px !important;
    line-height: 18px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-actions {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    gap: 8px !important;
    margin: 12px 0 6px !important;
    box-sizing: border-box !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-stage[data-step="2"] .ca-actions {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    flex-direction: column-reverse !important;
    gap: 8px !important;
    margin: 12px 0 6px !important;
    box-sizing: border-box !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-stage[data-step="2"] :is(.ca-primary, .ca-secondary) {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-footer,
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-body:not([data-ca-step="1"]) .ca-footer,
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-body[data-ca-step="1"] .ca-footer {
    position: static !important;
    flex: 0 0 auto !important;
    height: auto !important;
    margin-top: 8px !important;
    padding: 10px var(--mobile-gutter) calc(12px + var(--mobile-bottom)) !important;
    border-top: 1px solid #edf0f2 !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-footer-inner {
    position: static !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    height: auto !important;
    gap: 6px !important;
    padding: 0 !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-footer-company,
  html[data-wise-mobile-layout][data-wise-keyboard] .ca-footer-links {
    position: static !important;
    gap: 8px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] :is(.ca-footer-help, .ca-suggestions, .ca-testimonial-toast) {
    display: none !important;
  }

  /* /2.html, /5.html, /8.html with soft keyboard open */
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui:is([data-demo-route="/2.html"], [data-demo-route="/5.html"], [data-demo-route="/8.html"]) {
    height: auto !important;
    min-height: var(--mobile-screen) !important;
    max-height: none !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui:is([data-demo-route="/2.html"], [data-demo-route="/5.html"], [data-demo-route="/8.html"]) .header .header-content {
    height: 44px !important;
    min-height: 44px !important;
    padding: 5px var(--mobile-gutter) !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/2.html"] > .container {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 8px var(--mobile-gutter) calc(16px + var(--mobile-bottom)) !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/2.html"] > .container > .card,
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/2.html"] > .container > .card > .step[style*="display: block"] {
    min-height: 0 !important;
    flex: 0 0 auto !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/2.html"] .step-indicators {
    margin-bottom: 6px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/2.html"] .progress-bar {
    margin-bottom: 10px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/2.html"] .step-icon {
    width: 32px !important;
    height: 32px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/2.html"] .step-header h1 {
    font-size: 21px !important;
    line-height: 25px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/2.html"] .step-subtitle {
    margin: 4px 0 10px !important;
    font-size: 13px !important;
    line-height: 18px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/2.html"] .form-group input,
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/2.html"] .form-input,
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/2.html"] .btn-primary {
    min-height: 48px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/2.html"] .trust-bar {
    margin-top: 10px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/8.html"] .wrap {
    height: auto !important;
    min-height: var(--mobile-screen) !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/8.html"] .wrap > .card {
    flex: 0 0 auto !important;
    min-height: auto !important;
    overflow: visible !important;
    padding: 8px var(--mobile-gutter) calc(16px + var(--mobile-bottom)) !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/8.html"] .card h1 {
    font-size: 20px !important;
    line-height: 24px !important;
    margin-bottom: 4px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/8.html"] .info-box {
    margin: 8px 0 !important;
    padding: 10px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/8.html"] .info-list li {
    font-size: 12px !important;
    line-height: 16px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/8.html"] .card .form-group {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui[data-demo-route="/8.html"] #submitBtn {
    margin-top: 14px !important;
    min-height: 48px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui.wq-page[data-demo-route="/5.html"] > .container,
  html[data-wise-mobile-layout][data-wise-keyboard] body.flow-step-ui.wq-page[data-demo-route="/5.html"] > .container > .card {
    flex: 0 0 auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  /* /chat.html stays pinned inside visual viewport when keyboard is up */
  html[data-wise-mobile-layout][data-wise-keyboard] body.guided-chat {
    position: relative !important;
    top: var(--wise-viewport-top, 0px) !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.guided-chat :is(.topbar, .chat-bottom-note) {
    display: none !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.guided-chat .agent {
    padding: 6px 14px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.guided-chat .chat-history {
    min-height: 64px !important;
    padding: 8px 12px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body.guided-chat .chat-reply-panel {
    max-height: 62% !important;
    padding: 10px 14px 8px !important;
  }

  /* Account / Withdraw sheet & Identity sheet with keyboard open */
  html[data-wise-mobile-layout][data-wise-keyboard] body[data-demo-route="/conta.html"] :is(.bn, .bnav) {
    display: none !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] body[data-demo-route="/conta.html"] .app,
  html[data-wise-mobile-layout][data-wise-keyboard] body[data-spei-page="account"] .app {
    position: relative !important;
    top: var(--wise-viewport-top, 0px) !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .is-account-preview .account-withdraw-hero {
    padding: 14px 8px 10px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .is-account-preview .account-withdraw-hero > strong {
    font-size: clamp(26px, 7vw, 32px) !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .is-account-preview #accountBankTitle {
    margin-bottom: 8px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .is-account-preview .account-step-description {
    margin-bottom: 10px !important;
    font-size: 13px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .is-account-preview .account-bank-field {
    margin: 10px 0 !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] .is-account-preview .account-withdraw-footer {
    margin-top: 8px !important;
    padding: 8px 0 max(8px, var(--mobile-bottom)) !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] #identitySheet .identity-sheet-head {
    padding: 12px 16px 8px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] #identitySheet .sheet-progress {
    padding: 8px 16px 0 !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] #identitySheet > .step {
    padding: 12px 16px 16px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] #identitySheet .sheet-symbol {
    display: none !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] #identitySheet .step h3 {
    font-size: 20px !important;
  }
  html[data-wise-mobile-layout][data-wise-keyboard] #identitySheet .step-subtitle {
    margin-bottom: 10px !important;
    font-size: 13px !important;
  }
}

/* Global physical-device ergonomics across all routes, viewports and tablets. */
html[data-wise-mobile-layout] {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html[data-wise-mobile-layout] :is(button, a, input, select, textarea, label, summary, [role="button"]) {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
html[data-wise-mobile-layout] body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}
@media (min-width: 768px) and (max-width: 1180px) {
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.upsell-operational-page, .contract-opening-preview.upsell-single-screen, .contract-preview-page:not(.contract-stage-four)) .wrap.contract-shell {
    justify-content: center !important;
    max-width: min(92vw, 620px) !important;
    padding: max(20px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom)) !important;
  }
  html[data-wise-mobile-layout] body[data-spei-page="upsell"]:is(.upsell-operational-page, .contract-opening-preview.upsell-single-screen, .contract-preview-page:not(.contract-stage-four)) .wrap > .card:is(.upsell-operational-card, .contract-card) {
    flex: 0 0 auto !important;
    padding: clamp(22px, 3vw, 28px) !important;
  }
}
@media (max-width: 767px) {
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-card > .upsell-operational-consent {
    margin-top: auto !important;
    padding-top: 10px;
  }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-card > .upsell-operational-button:first-of-type {
    margin-top: auto !important;
  }
  html[data-wise-mobile-layout] body.upsell-operational-page .upsell-operational-card > .upsell-operational-consent + .upsell-operational-button {
    margin-top: 0 !important;
  }
}


/* Universal Physical Mobile Device Adaptation (320px to 430px+ Portrait, Short Screens & Landscape) */
@media (max-width: 900px), (max-height: 500px) and (pointer: coarse) {
  /* /aprovado.html: full page scroll + sticky bottom CTA so all blocks & assigned Citi card are always visible */
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary {
    height: auto !important;
    min-height: var(--mobile-screen) !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary > .wrap {
    flex: 1 0 auto !important;
    height: auto !important;
    overflow: visible !important;
  }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .flow-status-page {
    flex: 1 0 auto !important;
    height: auto !important;
    overflow: visible !important;
    padding: 8px var(--mobile-gutter) 16px !important;
  }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .approval-citi-card-banner {
    grid-template-columns: clamp(88px, 26vw, 116px) minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 12px !important;
    margin-top: 10px !important;
  }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .approval-citi-card-media img {
    width: 100% !important;
    height: auto !important;
  }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .approval-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-top: 10px !important;
  }
  @media (max-width: 340px) {
    html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .approval-stats {
      grid-template-columns: minmax(0, 1fr) !important;
    }
  }
  html[data-wise-mobile-layout] body.application-flow-ui.is-approval-summary .approval-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 30 !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(10px) !important;
    padding: 10px var(--mobile-gutter) max(12px, calc(8px + var(--mobile-bottom))) !important;
  }

  /* /ingrid.html (wq-bridge): responsive 3:2 portrait & scrollable container on short phones */
  html[data-wise-mobile-layout]:has(body.wq-bridge) {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  html[data-wise-mobile-layout] body.wq-bridge {
    height: auto !important;
    min-height: var(--mobile-screen) !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }
  html[data-wise-mobile-layout] body.wq-bridge .wq-avatar {
    width: min(232px, 64vw) !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 2 !important;
  }

  /* /conta.html legacy bottom nav (.bn) 4-column grid */
  html[data-wise-mobile-layout] body[data-spei-page="account"] .bn {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    padding-bottom: max(8px, var(--mobile-bottom)) !important;
  }
}

/* Online green status dot, selfie Citi header logo & executive card elevation */
html[data-wise-mobile-layout] .agent-status {
  color: #15803d !important;
  font-weight: 600 !important;
}
html[data-wise-mobile-layout] .agent-status::before {
  background: #16a34a !important;
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  box-shadow: 0 0 0 2.5px rgba(34, 197, 94, 0.26) !important;
}
html[data-wise-mobile-layout] body.identity-flow .topbar .brand img,
html[data-wise-mobile-layout] body.identity-flow.identity-camera-screen .topbar .brand img {
  content: url('/assets/marca-fornecida.png') !important;
  filter: none !important;
}
html[data-wise-mobile-layout] body.application-flow-ui .approval-citi-card-banner,
html[data-wise-mobile-layout] body.application-flow-ui .approval-stats > section,
html[data-wise-mobile-layout] body.application-flow-ui .approval-first-payment {
  border: 1.5px solid #bdd6ef !important;
  box-shadow: 0 18px 38px -6px rgba(0, 38, 84, 0.22), 0 7px 18px -3px rgba(0, 38, 84, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}
#approvalPreviewNotice,
.approval-preview-notice {
  display: none !important;
}
