/* First-run guide (v133): full screen on phones, a centred card on wider screens. */
html.jf-ob-lock,html.jf-ob-lock body{overflow:hidden}
.jf-ob{position:fixed;inset:0;z-index:12000;display:flex;align-items:center;justify-content:center;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#f2f1f7;--ob-out:cubic-bezier(.23,1,.32,1)}
.jf-ob *{box-sizing:border-box}
.jf-ob-backdrop{position:absolute;inset:0;background:#05070dd9;backdrop-filter:blur(8px)}
.jf-ob-panel{position:relative;display:flex;flex-direction:column;width:min(440px,100%);height:min(820px,calc(100dvh - 40px));overflow-y:auto;padding:28px 24px 24px;border:1px solid #262935;border-radius:28px;background:radial-gradient(420px 300px at 80% -10%,rgba(139,92,246,.22),transparent 70%),#0b0d14;box-shadow:0 40px 120px #000a;animation:jfObIn .35s var(--ob-out)}
.jf-ob-panel>*{animation:jfObRise .45s var(--ob-out) both}
.jf-ob-panel>*:nth-child(2){animation-delay:.04s}.jf-ob-panel>*:nth-child(3){animation-delay:.08s}.jf-ob-panel>*:nth-child(4){animation-delay:.12s}.jf-ob-panel>*:nth-child(n+5){animation-delay:.16s}
@keyframes jfObIn{from{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:none}}
@keyframes jfObRise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:560px){.jf-ob-panel{width:100%;height:100dvh;border:0;border-radius:0;padding:calc(18px + env(safe-area-inset-top)) 20px calc(18px + env(safe-area-inset-bottom))}}

.jf-ob h2{margin:22px 0 0;font-size:27px;line-height:1.12;letter-spacing:-.7px;font-weight:700;color:#f2f1f7;outline:none}
.jf-ob-sub{margin:10px 0 0;color:#b4b8c6;font-size:15px;line-height:1.5}
.jf-ob-top{display:flex;justify-content:space-between;align-items:center;min-height:44px;color:#9da4b2;font-size:13px}
.jf-ob-link{min-height:44px;padding:0 4px;border:0;background:none;color:#9da4b2;font:inherit;font-size:14px;cursor:pointer}
.jf-ob-link:hover{color:#fff}
.jf-ob-prog{display:flex;gap:6px;margin-top:4px}.jf-ob-prog i{flex:1;height:4px;border-radius:99px;background:#252836;transition:background-color .3s ease}.jf-ob-prog i.on{background:#8b5cf6}
.jf-ob-label{display:block;margin:16px 0 8px;color:#9da4b2;font-size:13px;font-weight:500}
.jf-ob-label.strong{color:#f2f1f7;font-size:14px;font-weight:600}

/* Buttons */
.jf-ob-actions{position:sticky;bottom:-24px;z-index:1;margin:auto -24px -24px;padding:20px 24px 24px;display:grid;gap:4px;background:linear-gradient(rgba(11,13,20,0),#0b0d14 22px)}
@media(max-width:560px){.jf-ob-actions{bottom:calc(-18px - env(safe-area-inset-bottom));margin:auto -20px calc(-18px - env(safe-area-inset-bottom));padding:20px 20px calc(18px + env(safe-area-inset-bottom))}}
.jf-ob-btn{min-height:54px;border:0;border-radius:14px;background:#7446e8;color:#fff;font:600 16px/1 inherit;cursor:pointer;transition:transform .16s var(--ob-out),background-color .2s ease}
.jf-ob-btn:hover{background:#8358f0}
.jf-ob-btn2{min-height:46px;border:0;border-radius:14px;background:none;color:#b4b8c6;font:500 15px/1 inherit;cursor:pointer}
.jf-ob-btn2:hover{color:#fff}
.jf-ob button:active{transform:scale(.97)}
.jf-ob button:focus-visible,.jf-ob select:focus-visible,.jf-ob input:focus-visible{outline:2px solid #a78bfa;outline-offset:2px}

/* Welcome */
.jf-ob-hero{display:flex;flex-direction:column;align-items:center;text-align:center;margin-top:28px}
.jf-ob-hero h2{margin-top:26px}
.jf-ob-hero .jf-ob-sub{max-width:300px}
.jf-ob-badge{width:96px;height:96px;border-radius:26px;display:grid;place-items:center;background:linear-gradient(180deg,#2a1d56,#14112a);border:1px solid #5b47a8;box-shadow:0 0 60px rgba(139,92,246,.45)}
.jf-ob-steps{list-style:none;margin:28px 0 0;padding:0;display:grid;gap:10px}
.jf-ob-steps li{display:flex;gap:12px;align-items:center;padding:14px;border-radius:14px;border:1px solid #262935;background:#14161e}
.jf-ob-steps li.soft{opacity:.75}
.jf-ob-steps .n{flex:0 0 30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:14px;background:#2a2150;color:#cfc4f5}
.jf-ob-steps .n.ok{background:#11241d;color:#8fe3be}
.jf-ob-steps b{display:block;font-size:15px}.jf-ob-steps small{color:#9da4b2;font-size:13px}

/* Account step */
.jf-ob-firms{display:grid;gap:8px;margin-top:14px}
.jf-ob-firm{display:flex;align-items:center;gap:12px;width:100%;min-height:62px;padding:10px 14px;border:1px solid #2c2f3b;border-radius:14px;background:#12141c;color:#f2f1f7;font:inherit;text-align:left;cursor:pointer;transition:border-color .2s ease,background-color .2s ease}
.jf-ob-firm:hover{border-color:#4a4e5e}
.jf-ob-firm[aria-pressed="true"]{border-color:#8b5cf6;background:#1c1830}
.jf-ob-firm .txt{flex:1}.jf-ob-firm b{display:block;font-size:15px}.jf-ob-firm small{color:#9da4b2;font-size:12px}
.jf-ob-logo{flex:0 0 38px;height:38px;border-radius:10px;display:grid;place-items:center;font-weight:800;font-size:13px}
.jf-ob-logo.fn{background:#1e2d5a;color:#9fc0ff}.jf-ob-logo.ft{background:#2b1f12;color:#ffc46b}.jf-ob-logo.fp{background:#14302a;color:#7fe0bf}
.jf-ob-firm .radio{flex:0 0 20px;height:20px;border-radius:50%;border:2px solid #4a4e5e;transition:border-width .2s var(--ob-out),border-color .2s ease}
.jf-ob-firm[aria-pressed="true"] .radio{border:6px solid #8b5cf6}
.jf-ob-chips{display:flex;flex-wrap:wrap;gap:8px}
.jf-ob-chip{min-height:44px;padding:0 13px;border:1px solid #2c2f3b;border-radius:99px;background:transparent;color:#c5cad6;font:500 14px/1 inherit;cursor:pointer;transition:background-color .2s ease,border-color .2s ease,color .2s ease}
.jf-ob-chip:hover{border-color:#4a4e5e}
.jf-ob-chip[aria-pressed="true"]{background:#2a2150;border-color:#6b4fd8;color:#fff}
.jf-ob-rules{margin-top:16px;padding:14px;border-radius:14px;background:#11241d;border:1px solid #1d3f31}
.jf-ob-rules p{margin:0;display:flex;align-items:center;gap:8px;color:#8fe3be;font-size:13px;font-weight:600}
.jf-ob-rules ul{list-style:none;margin:10px 0 0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:6px 10px;color:#c9e9da;font-size:13px}
.jf-ob-rules li b{color:#fff;font-variant-numeric:tabular-nums}
.jf-ob-rules small{display:block;margin-top:10px;color:#7fae98;font-size:12px}

/* Trade step */
.jf-ob-field{width:100%;min-height:48px;padding:0 14px;border:1px solid #2c2f3b;border-radius:12px;background:#0f1117;color:#f2f1f7;font:inherit;font-size:16px}
.jf-ob-field:focus{border-color:#8b5cf6;box-shadow:0 0 0 3px rgba(139,92,246,.25);outline:none}
.jf-ob-field:disabled{opacity:.5}
.jf-ob-static{display:flex;align-items:center}
.jf-ob-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.jf-ob-segs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.jf-ob-seg{min-height:46px;border:1px solid #2c2f3b;border-radius:12px;background:transparent;color:#c5cad6;font:500 14px/1 inherit;cursor:pointer}
.jf-ob-seg.win[aria-pressed="true"]{background:#11241d;border-color:#2f7a5a;color:#8fe3be;font-weight:600}
.jf-ob-seg.loss[aria-pressed="true"]{background:#33171c;border-color:#7a3340;color:#ff9aa3;font-weight:600}
.jf-ob-seg.be[aria-pressed="true"]{background:#1c1830;border-color:#6b4fd8;color:#fff;font-weight:600}
.jf-ob-error{margin:10px 0 0;min-height:0;color:#ff9aa3;font-size:13px}
.jf-ob-error:empty{display:none}
.jf-ob-tip{margin-top:14px;padding:12px 14px;border-radius:12px;background:#1c1830;border:1px solid #2e2650;color:#cfc4f5;font-size:13px;line-height:1.45}

/* Done step */
.jf-ob-panel[data-step="3"] h2{margin-top:10px;font-size:24px}
.jf-ob-ok{position:relative;display:flex;align-items:center;gap:6px;margin:64px 0 0;color:#8fe3be;font-size:13px;font-weight:600}
.jf-ob-card{margin-top:14px;padding:18px;border-radius:16px;border:1px solid #262935;background:#14161e}
.jf-ob-big{margin:0;font-size:64px;font-weight:700;letter-spacing:-2.5px;line-height:1;font-variant-numeric:tabular-nums}
.jf-ob-bars{display:grid;grid-template-columns:repeat(10,1fr);gap:4px;margin-top:14px}
.jf-ob-bars i{height:9px;border-radius:3px;background:#2a2d39}
.jf-ob-bars i.on{background:#e7b04a;animation:jfObSeg .4s var(--ob-out) both}
.jf-ob-bars i.on:nth-child(2){animation-delay:.08s}.jf-ob-bars i.on:nth-child(3){animation-delay:.16s}.jf-ob-bars i.on:nth-child(n+4){animation-delay:.24s}
@keyframes jfObSeg{from{background:#2a2d39;transform:scaleY(.6)}}
.jf-ob-used{display:flex;justify-content:space-between;gap:8px;margin-top:8px;color:#9da4b2;font-size:12px}.jf-ob-used b{color:#e7b04a}
.jf-ob-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px}
.jf-ob-tiles div{padding:11px;border-radius:12px;background:#0f1117;border:1px solid #22252f;min-width:0}
.jf-ob-tiles span{display:block;color:#9da4b2;font-size:11px}
.jf-ob-tiles strong{display:block;margin-top:4px;font-size:16px;font-variant-numeric:tabular-nums}
.jf-ob-tiles small{color:#6e7284;font-size:12px;font-weight:500}
.jf-ob-check{list-style:none;margin:0;padding:0;display:grid;gap:9px;font-size:14px;color:#c5cad6}
.jf-ob-check li{display:flex;align-items:center;gap:10px}
.jf-ob-check li>span{flex:0 0 20px;height:20px;border-radius:50%;border:2px solid #4a4e5e;display:grid;place-items:center}
.jf-ob-check li.ok{color:#f2f1f7}.jf-ob-check li.ok>span{border:0;background:#34c98a;color:#0b0d14}
.jf-ob-confetti{position:absolute;inset:0 0 auto;height:84px;pointer-events:none;overflow:hidden}
.jf-ob-confetti i{position:absolute;top:-16px;width:8px;height:14px;border-radius:2px;animation:jfObFall 1.6s var(--ob-out) both}
.jf-ob-confetti i:nth-child(1){left:12%;background:#a78bfa;--r:200deg}.jf-ob-confetti i:nth-child(2){left:28%;background:#34c98a;--r:-160deg;animation-delay:.1s}
.jf-ob-confetti i:nth-child(3){left:46%;background:#ef626c;--r:220deg;animation-delay:.05s}.jf-ob-confetti i:nth-child(4){left:62%;background:#e7b04a;--r:-200deg;animation-delay:.15s}
.jf-ob-confetti i:nth-child(5){left:78%;background:#a78bfa;--r:180deg;animation-delay:.08s}.jf-ob-confetti i:nth-child(6){left:90%;background:#34c98a;--r:-240deg;animation-delay:.2s}
@keyframes jfObFall{from{transform:translateY(0) rotate(0);opacity:1}to{transform:translateY(54px) rotate(var(--r));opacity:.9}}

@media(prefers-reduced-motion:reduce){.jf-ob *,.jf-ob-panel{animation:none!important;transition:none!important}.jf-ob-confetti{display:none}}

/* Compact firm picker: three tiles in a row */
.jf-ob-firms{grid-template-columns:repeat(3,minmax(0,1fr))}
.jf-ob-firm{position:relative;flex-direction:column;align-items:flex-start;gap:8px;min-height:0;padding:12px}
.jf-ob-firm .radio{position:absolute;top:12px;right:12px;flex:none;width:18px;height:18px}
.jf-ob-firm[aria-pressed="true"] .radio{border-width:5px}
.jf-ob-firm b{font-size:14px}
.jf-ob-firm small{display:none}
.jf-ob-hint{margin:8px 0 0;color:#8fe3be;font-size:12px;font-weight:600}
.jf-ob-label{margin:14px 0 8px}
.jf-ob-firm .jf-ob-logo{flex:none;width:34px;height:34px;font-size:12px}
