/* KSH <-> USD strip + converter */
#fx-fxstrip { display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: 100%; padding: 6px 10px; min-height: 44px; position: relative; z-index: 5;
    background: linear-gradient(90deg, #07142f, #0e2a63 55%, #07142f); border-bottom: 1px solid rgba(255,196,64,.45);
    box-shadow: 0 6px 16px -10px rgba(0,0,0,.6); font-family: inherit; color: #fff; }
#fx-fxstrip::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, #ffc440, transparent); opacity: .8; }
.fxs__seg { position: relative; display: flex; flex: none; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.fxs__seg button { position: relative; z-index: 1; display: flex; align-items: center; gap: 5px; border: 0; background: none; color: #b8c6e6; font-family: inherit; font-weight: 800; font-size: 11.5px; line-height: 1; letter-spacing: .04em; padding: 7px 11px; border-radius: 999px; cursor: pointer; transition: color .2s; -webkit-tap-highlight-color: transparent; }
.fxs__seg button i { font-style: normal; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 9px; background: rgba(255,255,255,.12); font-size: 9.5px; font-weight: 900; }
.fxs__seg button[aria-pressed="true"] { color: #0b1530; }
.fxs__seg button[aria-pressed="true"] i { background: rgba(11,21,48,.18); }
.fxs__thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: linear-gradient(135deg, #ffd45a, #ff9f1c); box-shadow: 0 4px 12px -3px rgba(255,170,30,.8); transition: transform .28s cubic-bezier(.3,1.3,.5,1); }
#fx-fxstrip[data-mode="KSH"] .fxs__thumb { transform: translateX(100%); }
.fxs__mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.fxs__lbl { font-size: 9.5px; font-weight: 700; letter-spacing: .03em; color: #8fb0f0; white-space: nowrap; }
.fxs__amt { font-size: 15px; font-weight: 900; color: #ffd45a; white-space: nowrap; font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(255,200,64,.35); }
.fxs__open { flex: none; display: flex; align-items: center; gap: 5px; border: 0; cursor: pointer; padding: 8px 11px; border-radius: 999px; font-family: inherit; font-weight: 800; font-size: 11px; line-height: 1; color: #fff; background: linear-gradient(135deg, #8b5cf6, #ec4899); box-shadow: 0 6px 14px -6px rgba(236,72,153,.9); }
.fxs__open svg { transition: transform .4s; } .fxs__open:active svg { transform: rotate(180deg); }
@media (max-width: 340px) { .fxs__open span { display: none; } }

#fx-fxsheet[hidden] { display: none; }
#fx-fxsheet { position: fixed; inset: 0; z-index: 2147482000; display: flex; align-items: flex-end; justify-content: center; font-family: inherit; }
.fxc__back { position: absolute; inset: 0; background: rgba(3,8,22,.66); backdrop-filter: blur(3px); animation: fxcf .2s; }
.fxc__card { position: relative; width: min(440px, 100%); box-sizing: border-box; padding: 22px 18px calc(20px + env(safe-area-inset-bottom, 0px)); border-radius: 22px 22px 0 0; color: #fff;
    background: radial-gradient(120% 80% at 0 0, #17419a 0%, #0a1d46 55%, #060f26 100%); border: 1px solid rgba(255,196,64,.4); border-bottom: 0; box-shadow: 0 -20px 50px -10px rgba(0,0,0,.7); animation: fxcu .28s cubic-bezier(.2,.9,.3,1); }
@media (min-width: 560px) { #fx-fxsheet { align-items: center; } .fxc__card { border-radius: 22px; border-bottom: 1px solid rgba(255,196,64,.4); } }
.fxc__card h3 { margin: 0 0 4px; font-size: 22px; font-weight: 900; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.fxc__card h3 span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #ffd45a, #ff9f1c); color: #0b1530; }
.fxc__rate { margin: 0 0 14px; font-size: 12px; color: #9fb8ee; }
.fxc__x { position: absolute; right: 12px; top: 8px; border: 0; background: none; color: #fff; font-size: 28px; cursor: pointer; line-height: 1; }
.fxc__row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); }
.fxc__row:focus-within { border-color: #ffd45a; box-shadow: 0 0 0 3px rgba(255,212,90,.2); }
.fxc__tag { flex: none; font-style: normal; font-weight: 900; font-size: 12px; letter-spacing: .06em; padding: 7px 10px; border-radius: 10px; color: #0b1530; background: linear-gradient(135deg, #ffd45a, #ff9f1c); }
.fxc__tag.b { background: linear-gradient(135deg, #7dd3fc, #38bdf8); }
.fxc__in { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font-family: inherit; font-weight: 800; font-size: 24px; line-height: 1.2; text-align: right; font-variant-numeric: tabular-nums; }
.fxc__in::placeholder { color: rgba(255,255,255,.3); }
.fxc__swap { display: grid; place-items: center; width: 38px; height: 38px; margin: -6px auto; position: relative; z-index: 1; border: 3px solid #0a1d46; border-radius: 50%; cursor: pointer; color: #fff; background: linear-gradient(135deg, #8b5cf6, #ec4899); transform: rotate(90deg); transition: transform .35s; }
.fxc__swap:active { transform: rotate(270deg); }
.fxc__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 10px; }
.fxc__chips button { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #e8f0ff; font-family: inherit; font-weight: 700; font-size: 12.5px; line-height: 1; padding: 9px 13px; border-radius: 999px; cursor: pointer; }
.fxc__chips button:last-child { border-color: #ffd45a; color: #ffd45a; }
.fxc__note { margin: 0; font-size: 11px; color: #7e97cf; }
html.fxc-open { overflow: hidden; }
@keyframes fxcu { from { transform: translateY(40px); opacity: 0; } }
@keyframes fxcf { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fxc__card, .fxc__back, .fxs__thumb { animation: none; transition: none; } }

/* beat the app's global input styles */
#fx-fxsheet .fxc__in { all: unset; box-sizing: border-box; flex: 1; min-width: 0; width: 100%; color: #fff !important; background: transparent !important; font-family: inherit !important; font-weight: 800 !important; font-size: 24px !important; line-height: 1.2 !important; text-align: right; font-variant-numeric: tabular-nums; caret-color: #ffd45a; padding: 2px 0; height: auto; }
#fx-fxsheet .fxc__in::placeholder { color: rgba(255,255,255,.3); }
#fx-fxstrip .fxs__seg button { padding: 7px 9px; }
#fx-fxstrip .fxs__seg button i { min-width: 16px; height: 16px; }
#fx-fxstrip .fxs__amt { font-size: 14px; }
#fx-fxstrip[data-mode="KSH"] .fxs__amt { font-size: 13px; }
#fx-fxstrip .fxs__mid { flex: 1 1 0; }
#fx-fxstrip .fxs__open { padding: 8px 10px; }
@media (max-width: 380px) { #fx-fxstrip { gap: 6px; padding: 6px 8px; } #fx-fxstrip .fxs__open span { display: none; } #fx-fxstrip .fxs__open { padding: 9px; } }

/* ===== header: balance always fully visible on phones ===== */
@media (max-width: 520px) {
    html body:not(#_) .app-header--mobile { overflow: hidden; }
    html body:not(#_) .app-header--mobile .deriv-wrapper__left { flex: 0 1 auto !important; min-width: 0 !important; gap: 0 !important; }
    html body:not(#_) .app-header--mobile .deriv-wrapper__right { flex: 1 1 auto !important; min-width: 0 !important; justify-content: flex-end !important; margin-left: auto; }
    html body:not(#_) .app-header--mobile .deriv-wrapper__right > div, html body:not(#_) .app-header--mobile .run-panel__info, html body:not(#_) .app-header--mobile .dc-popover__target { min-width: 0 !important; max-width: 100% !important; }
    html body:not(#_) .app-header--mobile .ts-logo { gap: 5px !important; padding-left: 8px !important; }
    html body:not(#_) .app-header--mobile .ts-logo__mark { width: 22px !important; height: 22px !important; }
    html body:not(#_) .app-header--mobile .ts-logo__name { font-size: 15px !important; letter-spacing: -.01em !important; }
    html body:not(#_) .app-header--mobile .ts-logo__sub { font-size: 8px !important; }
    html body:not(#_) .app-header--mobile .mobile-menu, html body:not(#_) .app-header--mobile .mobile-menu__toggle, html body:not(#_) .app-header--mobile .mobile-menu__toggle-btn { width: 30px !important; min-width: 0 !important; padding: 0 !important; margin: 0 !important; }
    html body:not(#_) .app-header--mobile .ts-hdr-link { width: 30px !important; min-width: 0 !important; padding: 0 !important; margin: 0 !important; display: inline-flex; justify-content: center; }
    html body:not(#_) .app-header--mobile .deriv-account-switcher__button { padding: 0 8px 0 6px !important; gap: 5px !important; min-width: 0 !important; max-width: 100%; white-space: nowrap; }
    html body:not(#_) .app-header--mobile .deriv-account-switcher__currency-icon, html body:not(#_) .app-header--mobile .deriv-account-switcher__currency-icon svg { width: 20px !important; height: 20px !important; flex: none; }
    html body:not(#_) .app-header--mobile .deriv-account-switcher__balance { display: flex !important; gap: 3px !important; white-space: nowrap !important; font-size: 13px !important; font-weight: 800 !important; min-width: 0; }
    html body:not(#_) .app-header--mobile .deriv-account-switcher__balance span { font-size: inherit !important; white-space: nowrap; }
    html body:not(#_) .app-header--mobile .deriv-account-switcher__button > svg { width: 14px !important; height: 14px !important; flex: none; }
}
@media (max-width: 400px) { html body:not(#_) .app-header--mobile .ts-logo__name { font-size: 13.5px !important; } html body:not(#_) .app-header--mobile .ts-logo__sub { font-size: 7.5px !important; } }
@media (max-width: 340px) { html body:not(#_) .app-header--mobile .ts-logo__name { font-size: 12px !important; } html body:not(#_) .app-header--mobile .deriv-account-switcher__balance { font-size: 12px !important; } }

/* ===== wordmark: TRADE WITH / PRINCE / powered by Deriv ===== */
html body:not(#_) .ts-logo__txt { display: flex !important; flex-direction: column !important; align-items: flex-start; gap: 0 !important; line-height: 1 !important; }
html body:not(#_) .ts-logo__name { background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important; color: inherit !important; display: flex !important; flex-direction: column; align-items: flex-start; font-size: inherit !important; letter-spacing: normal !important; line-height: 1 !important; text-transform: none !important; }
html body:not(#_) .ts-logo__pre { display: flex; align-items: center; gap: 5px; font-size: 7.5px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: #5b6b8c !important; -webkit-text-fill-color: #5b6b8c; line-height: 1; margin-bottom: 1px; }
html body:not(#_) .ts-logo__pre::after { content: ""; width: 14px; height: 1.5px; border-radius: 2px; background: linear-gradient(90deg, #f5b301, rgba(245,179,1,0)); }
html body:not(#_) .ts-logo__main { font-size: 20px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; line-height: 1; padding: 1px 0 2px;
    background: linear-gradient(100deg, #0a2a8a 0%, #1258e0 38%, #3d8bff 70%, #7ab4ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent !important; -webkit-text-fill-color: transparent; filter: drop-shadow(0 1px 0 rgba(255,255,255,.7)) drop-shadow(0 3px 6px rgba(18,88,224,.28)); }
html body:not(#_) .ts-logo__sub { font-size: 7.5px !important; letter-spacing: .14em !important; text-transform: uppercase; font-weight: 700 !important; color: #8793ad !important; display: flex; align-items: center; gap: 4px; line-height: 1; }
html body:not(#_) .ts-logo__sub em { font-style: normal !important; font-weight: 900 !important; letter-spacing: .06em; color: #ff444f !important; -webkit-text-fill-color: #ff444f; }
html body:not(#_).theme--dark .ts-logo__pre { color: #9db0d6 !important; -webkit-text-fill-color: #9db0d6; }
html body:not(#_).theme--dark .ts-logo__main { background-image: linear-gradient(100deg, #8cc0ff 0%, #5aa0ff 45%, #ffd45a 100%); filter: drop-shadow(0 2px 8px rgba(90,160,255,.35)); }
@media (max-width: 520px) {
    html body:not(#_) .app-header--mobile .ts-logo__main { font-size: 17px !important; letter-spacing: .08em !important; }
    html body:not(#_) .app-header--mobile .ts-logo__pre { font-size: 7px !important; }
    html body:not(#_) .app-header--mobile .ts-logo__sub { font-size: 7px !important; }
}
@media (max-width: 340px) { html body:not(#_) .app-header--mobile .ts-logo__main { font-size: 15px !important; } }

/* ===== dashboard hero ===== */
html body:not(#_) section.fxd { border: 1px solid rgba(145,183,250,.32) !important; box-shadow: 0 1px 0 rgba(255,255,255,.14) inset, 0 28px 60px -28px rgba(6,24,80,.85), 0 0 0 1px rgba(7,22,58,.5);
    background: radial-gradient(90% 60% at 50% -8%, rgba(255,200,90,.16) 0%, rgba(255,200,90,0) 55%), radial-gradient(120% 80% at 50% -10%, #2a63c4 0%, #11346f 46%, #07163a 100%) !important; position: relative; }
html body:not(#_) section.fxd::before { content: ""; position: absolute; left: 12%; right: 12%; top: 0; height: 2px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, transparent, #ffd45a, transparent); box-shadow: 0 0 18px rgba(255,212,90,.7); pointer-events: none; }

html body:not(#_) .fxd__crumb { display: inline-flex !important; flex-wrap: nowrap !important; gap: 9px !important; padding: 8px 16px 8px 13px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px);
    font-size: 10px !important; font-weight: 800; letter-spacing: .2em !important; color: #dfe9ff !important; box-shadow: 0 6px 18px -10px rgba(0,0,0,.6); }
html body:not(#_) .fxd__crumb i { background: #2fd28a !important; box-shadow: 0 0 0 3px rgba(47,210,138,.22), 0 0 10px #2fd28a !important; animation: fxdpulse 2s ease-in-out infinite; }
html body:not(#_) .fxd__crumb em { color: #ffd45a; opacity: .9; }
html body:not(#_) .fxd__crumb span:first-of-type { color: #ffd45a; }
@keyframes fxdpulse { 50% { box-shadow: 0 0 0 6px rgba(47,210,138,0), 0 0 10px #2fd28a; } }
@media (max-width: 480px) { html body:not(#_) .fxd__crumb span:first-of-type, html body:not(#_) .fxd__crumb em { display: none; } }

html body:not(#_) .fxd__h1 { background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important; color: #fff !important; font-weight: 900 !important; letter-spacing: -.02em !important; line-height: 1.08 !important; text-wrap: balance; margin: 22px auto 0 !important; }
html body:not(#_) .fxd__h1a { background: linear-gradient(180deg, #ffffff 10%, #bcd3ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
html body:not(#_) .fxd__h1b { display: inline-block; position: relative; background: linear-gradient(100deg, #ffe08a 0%, #ffb52e 55%, #ff8f1f 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 4px 14px rgba(255,170,40,.35)); }
html body:not(#_) .fxd__h1b::after { content: ""; position: absolute; left: 4%; right: 4%; bottom: -6px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, #ffc440, transparent); }

html body:not(#_) .fxd__rule { max-width: 30rem; margin: 3rem auto 2.4rem !important; }
html body:not(#_) .fxd__rule b { border-color: #ffc440 !important; background: rgba(255,196,64,.25); box-shadow: 0 0 10px rgba(255,196,64,.6); }
html body:not(#_) .fxd__rule::before, html body:not(#_) .fxd__rule::after { background: linear-gradient(90deg, transparent, rgba(255,196,64,.6)) !important; }

html body:not(#_) .fxd__q { position: relative; max-width: 34ch; margin: 0 auto !important; padding: 0 6px; font-style: italic; font-weight: 500; line-height: 1.5; color: #cfdcf7 !important; text-wrap: balance; }
html body:not(#_) .fxd__qm { font-family: Georgia, serif; font-style: normal; font-size: 1.9em; line-height: 0; position: relative; top: .28em; margin-right: 4px; color: #ffc440; opacity: .9; }

html body:not(#_) .fxd__sep { margin: 3.6rem 0 2.6rem !important; background: linear-gradient(90deg, transparent, rgba(255,196,64,.35), transparent) !important; }
html body:not(#_) .fxd__qa { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 1.15rem !important; font-weight: 800; letter-spacing: .38em !important; color: #ffd45a !important; margin-bottom: 2.2rem !important; }
html body:not(#_) .fxd__qa::before, html body:not(#_) .fxd__qa::after { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,212,90,.8)); }
html body:not(#_) .fxd__qa::after { transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) { html body:not(#_) .fxd__crumb i { animation: none; } }

/* header wordmark: compact so it never touches the header edges (phone, tablet and desktop) */
html body:not(#_) .ts-logo { align-items: center !important; }
html body:not(#_) .ts-logo__txt { transform: translateY(1px); }
html body:not(#_) .ts-logo__pre { font-size: 6.5px !important; margin-bottom: 0 !important; }
html body:not(#_) .ts-logo__main { font-size: 15.5px !important; padding: 0 0 1px !important; }
html body:not(#_) .ts-logo__sub { font-size: 6.5px !important; margin-top: 1px; }
html body:not(#_) .app-header--mobile .ts-logo__main { font-size: 15.5px !important; }
html body:not(#_) .app-header--mobile .ts-logo__pre, html body:not(#_) .app-header--mobile .ts-logo__sub { font-size: 6.5px !important; }
@media (max-width: 340px) { html body:not(#_) .app-header--mobile .ts-logo__main { font-size: 14px !important; } }
html body:not(#_) .ts-logo__sub em { font-size: 7.5px !important; line-height: 1 !important; }

/* ===== gold frame around the dashboard hero ===== */
html body:not(#_) section.fxd { border: 2px solid transparent !important;
    box-shadow: 0 0 0 1px rgba(7,22,58,.6), 0 0 26px -4px rgba(255,196,64,.42), 0 28px 60px -28px rgba(6,24,80,.85), inset 0 0 40px -10px rgba(255,196,64,.18) !important; outline: 1px solid rgba(255,212,90,.45); outline-offset: -10px; }
html body:not(#_) section.fxd { border: 2.5px solid transparent !important;
    background: radial-gradient(90% 60% at 50% -8%, rgba(255,200,90,.16) 0%, rgba(255,200,90,0) 55%) padding-box, radial-gradient(120% 80% at 50% -10%, #2a63c4 0%, #11346f 46%, #07163a 100%) padding-box,
        linear-gradient(120deg, #fff3c0 0%, #ffc83d 18%, #b8860b 38%, #ffe08a 52%, #c88a0a 70%, #ffd45a 86%, #fff3c0 100%) border-box !important; }
