/* Light and dark modes. Loaded last. Nothing here applies until a choice is made in Profile > Appearance (see theme-boot.js):
     html[data-theme="light"]  signed-in pages become light (the big green cards stay green, their pictures need the dark)
     html[data-theme="dark"]   public pages become dark, like the signed-in pages already are
   With no choice the site looks as it always did, so every rule below starts with one of those two attributes. */

/* a short fade while the choice is being switched */
html.theme-fade *,html.theme-fade *::before,html.theme-fade *::after{transition:background-color .35s ease,color .35s ease,border-color .35s ease,box-shadow .35s ease,fill .35s ease,stroke .35s ease!important}

/* ============================== signed-in pages, LIGHT ============================== */
html[data-theme=light].cust{background:#EDF2E4;color-scheme:light}
html[data-theme=light] body.cust{
  --g-line:rgba(11,31,20,.11);--g-fill:linear-gradient(160deg,rgba(255,255,255,.96),rgba(255,255,255,.78) 70%);--g-soft:#5A6B5E;--g-text:#0B1F14;--g-up:#12804D;--g-down:#C2412B;
  --sk-a:rgba(11,31,20,.07);--sk-b:rgba(11,31,20,.15);--dn-track:rgba(11,31,20,.1);--dn-soft:#5A6B5E;--dn-ink:#0B1F14;
  background:radial-gradient(900px 520px at 88% -4%,rgba(214,240,77,.45),transparent 62%),radial-gradient(760px 560px at -6% 34%,rgba(70,170,110,.2),transparent 66%),radial-gradient(600px 400px at 60% 105%,rgba(214,240,77,.2),transparent 70%),#EEF3E6;color:#0B1F14}
html[data-theme=light] .cust main.dash h1,html[data-theme=light] .cust main.dash h2,html[data-theme=light] .cust main.dash h3{color:#0B1F14}
html[data-theme=light] .cust main.dash .badge a{color:#4E6F0E}
html[data-theme=light] .cust .snav{background:rgba(11,31,20,.05)}
html[data-theme=light] .cust .snav a{color:#2F4538}
html[data-theme=light] .cust .snav a:hover{background:rgba(11,31,20,.07)}
html[data-theme=light] .cust .snav a[aria-current]{color:#0B1F14;box-shadow:0 8px 20px -8px rgba(143,176,21,.6),inset 0 1px 0 rgba(255,255,255,.6)}
html[data-theme=light] .cust :is(.tbl,.dn,.dhero,.card,.dp,.dclaim,.wform,.tticket,.tcard,.tnote,.wlc){box-shadow:0 24px 48px -30px rgba(11,31,20,.28),inset 0 1px 0 #fff;color:#0B1F14}
html[data-theme=light] .cust th{border-bottom-color:rgba(11,31,20,.1)}
html[data-theme=light] .cust td{border-bottom-color:rgba(11,31,20,.07)}
html[data-theme=light] .cust tbody tr:hover{background:rgba(143,176,21,.09)}
html[data-theme=light] .cust main.dash :is(input,select,textarea){background:#fff;color:#0B1F14;border:1px solid rgba(11,31,20,.2)}
html[data-theme=light] .cust main.dash input::placeholder{color:#8A9A8E}
html[data-theme=light] .cust main.dash input:focus,html[data-theme=light] .cust main.dash select:focus{outline-color:#8FB015;border-color:#8FB015}
html[data-theme=light] .cust main.dash .btn.ghost{background:rgba(11,31,20,.05);color:#0B1F14;border-color:rgba(11,31,20,.25)}
html[data-theme=light] .cust main.dash .btn.ghost:hover{background:rgba(11,31,20,.1)}
html[data-theme=light] .cust main.dash small,html[data-theme=light] .cust main.dash .hint{color:#5A6B5E}

/* panels, chips and numbers that were written for the dark theme */
html[data-theme=light] .cust :is(.tstats>div,.tside,.tsum,.efacts,.wlr,#v-profile .pf,.tmode,.tch){background:rgba(11,31,20,.045);border-color:rgba(11,31,20,.1)}
html[data-theme=light] .cust :is(.dhero #tot,.sum b,.tstats b,.tpx b,#v-profile .pf b,.esum b,.eack b){color:#0B1F14}
html[data-theme=light] .cust :is(.dtabs button,.tas button,.tside button,.tmode button,.tquick button,.tlev button){background:rgba(11,31,20,.045);color:#2F4538;border-color:rgba(11,31,20,.14)}
html[data-theme=light] .cust :is(.tas button,.tquick button,.tlev button,.dtabs button):hover{background:rgba(11,31,20,.1)}
html[data-theme=light] .cust :is(.dtabs button,.tside button,.tmode button)[aria-selected=true],html[data-theme=light] .cust :is(.dtabs button,.tside button)[aria-pressed=true],html[data-theme=light] .cust .tmode button[aria-checked=true]{background:#D6F04D;color:#0B1F14;border-color:#B5D82A}
html[data-theme=light] .cust :is(.dq code,#dadr){background:rgba(11,31,20,.06);color:#2F4538}
html[data-theme=light] .cust .tamt{color:#2F4538}
html[data-theme=light] .cust .tmk{background:rgba(11,31,20,.05);color:#5A6B5E}
html[data-theme=light] .cust .pill.ended{background:rgba(11,31,20,.08);color:#5A6B5E}
html[data-theme=light] .cust .eprog{background:rgba(11,31,20,.1)}
html[data-theme=light] .cust .tho{background:rgba(11,31,20,.04)}
html[data-theme=light] .cust .tho.on{background:rgba(214,240,77,.3);border-color:#9DBF18}
html[data-theme=light] .cust .crz span{color:#2F4538}

html[data-theme=light] .cust .dwarn,html[data-theme=light] .cust .tnote b{color:#B2391F}
html[data-theme=light] .cust .note{color:#6B4A00;background:rgba(245,200,75,.22)}
html[data-theme=light] .cust .pill.short{color:#B2391F}
html[data-theme=light] .cust .tmk.on{color:#1F6A3F}
html[data-theme=light] .cust .tmk.off{color:#B2391F}
html[data-theme=light] .cust .esum{color:#1F4A33}
html[data-theme=light] .cust #avrm.arm{background:rgba(194,65,43,.1);border-color:#C2412B;color:#B2391F}

/* the green hero cards stay green in light mode (their 3D pictures are made for a dark card) */
html[data-theme=light] .cust :is(.wal,.wcard,.phero,.thero,.ttz){
  --g-line:rgba(255,255,255,.14);--g-fill:linear-gradient(160deg,#0B2F1E,#061C12 70%);--g-soft:#B7C9BC;--g-text:#EAF3E4;--g-up:#6EE7A0;--g-down:#FF8A70;color:#EAF3E4;box-shadow:0 30px 50px -30px rgba(11,31,20,.55),inset 0 1px 0 rgba(255,255,255,.18)}
html[data-theme=light] .cust main.dash :is(.wal,.wcard,.phero,.thero,.ttz) :is(h1,h2,h3,b,strong){color:#fff}
html[data-theme=light] .cust main.dash :is(.wal,.wcard,.phero,.thero,.ttz) :is(small,p,.hint){color:#B7C9BC}
html[data-theme=light] .cust :is(.wal,.wcard,.phero,.thero,.ttz) :is(.tstats>div,.tside,.tsum,.efacts,.wlr,.tch){background:rgba(2,10,6,.45);border-color:rgba(255,255,255,.12)}
html[data-theme=light] .cust :is(.wal,.wcard,.phero,.thero,.ttz) :is(.tstats b,.tpx b,.sum b,.dhero #tot,.esum b,.eack b){color:#fff}
html[data-theme=light] .cust main.dash :is(.wal,.wcard,.phero,.thero,.ttz) .btn.ghost{background:rgba(255,255,255,.08);color:#fff;border-color:rgba(255,255,255,.3)}
html[data-theme=light] .cust main.dash :is(.wal,.wcard,.phero,.thero,.ttz) :is(input,select){background:rgba(2,10,6,.55);color:#fff;border-color:rgba(255,255,255,.2)}

/* ============================== public pages, DARK ============================== */
html[data-theme=dark]{color-scheme:dark;background:#03100A}
html[data-theme=dark] body:not(.cust){
  --bg:#03100A;--ink:#EAF3E4;--muted:#9DB3A3;--line:rgba(255,255,255,.13);--tint:rgba(255,255,255,.06);--up:#6EE7A0;--down:#FF8A70;--sk-a:rgba(255,255,255,.08);--sk-b:rgba(255,255,255,.2);
  background:radial-gradient(900px 520px at 88% -4%,rgba(214,240,77,.12),transparent 62%),radial-gradient(760px 560px at -6% 34%,rgba(46,139,87,.22),transparent 66%),#03100A;color:#EAF3E4}
html[data-theme=dark] body:not(.cust) a{color:inherit}
html[data-theme=dark] body:not(.cust) header{background:rgba(7,26,17,.78);border-color:rgba(255,255,255,.12);color:#EAF3E4}
html[data-theme=dark] body:not(.cust) header .btn{background:#D6F04D;border-color:#D6F04D;color:#0B1F14}
html[data-theme=dark] body:not(.cust) header.sc{color:#fff}
html[data-theme=dark] body:not(.cust) :is(.panel,.tbl,.ins article,.dn,.dwarn,.dq code){background:rgba(255,255,255,.06);color:#EAF3E4;border-color:rgba(255,255,255,.13)}
html[data-theme=dark] body:not(.cust) :is(.tabs button,.dtabs button,.tsn button,.btn.ghost,.lg){background:rgba(255,255,255,.07);color:#CFE0D3;border-color:rgba(255,255,255,.18)}
html[data-theme=dark] body:not(.cust) :is(.tabs button,.dtabs button,.tsn button)[aria-selected=true],html[data-theme=dark] body:not(.cust) :is(.tabs button,.dtabs button,.tsn button)[aria-pressed=true]{background:#D6F04D;color:#0B1F14;border-color:#D6F04D}
html[data-theme=dark] body:not(.cust) :is(.cf input,.cf textarea,.cf select,.mkbar input,.mkbar select){background:rgba(2,10,6,.55);color:#fff;border-color:rgba(255,255,255,.2)}
html[data-theme=dark] body:not(.cust) :is(.cf input,.cf textarea,.mkbar input)::placeholder{color:#6F8676}
html[data-theme=dark] body:not(.cust) .note{background:rgba(245,200,75,.12);color:#F7DE95}
html[data-theme=dark] body:not(.cust) :is(.otp-b,.otp-b.f,.otp-b.on){background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.22);color:#fff}
html[data-theme=dark] body:not(.cust) .otp.err .otp-b{background:rgba(255,120,90,.14);border-color:#FF8A70;color:#FFB4A3}
html[data-theme=dark] body:not(.cust) .otp.ok .otp-b{background:rgba(110,231,160,.16);border-color:#6EE7A0;color:#CFF8E0}
html[data-theme=dark] body:not(.cust) .otp-res,html[data-theme=dark] body:not(.cust) .lnk,html[data-theme=dark] body:not(.cust) .pwf .pwt{color:#EAF3E4}
html[data-theme=dark] body:not(.cust) .pwb i{background:rgba(255,255,255,.14)}
html[data-theme=dark] body:not(.cust) .pwm.ok .pwl{color:#6EE7A0}
html[data-theme=dark] body:not(.cust) .who{background:rgba(255,255,255,.07)}
html[data-theme=dark] body:not(.cust) .who-av{background:#D6F04D;color:#0B1F14}
html[data-theme=dark] body:not(.cust) .stp i{background:rgba(255,255,255,.2)}
html[data-theme=dark] body:not(.cust) .stp .d{background:#6EE7A0}
html[data-theme=dark] body:not(.cust) .stp .c{background:#D6F04D}
html[data-theme=dark] body:not(.cust) .btn:not(.ghost):not(.glass){background:#D6F04D;border-color:#D6F04D;color:#0B1F14}
html[data-theme=dark] body:not(.cust) .btn:not(.ghost):not(.glass)[disabled]{opacity:.5}
html[data-theme=dark] body:not(.cust) header nav button{color:#EAF3E4}
html[data-theme=dark] body:not(.cust) .ppl figcaption{background:rgba(7,26,17,.82);color:#EAF3E4}
html[data-theme=dark] body:not(.cust) .ppl figcaption *{color:inherit}
html[data-theme=dark] body:not(.cust) :is(.badge,.hint,small){color:#9DB3A3}
html[data-theme=dark] body:not(.cust) :is(.up,.badge.up){color:#6EE7A0}
html[data-theme=dark] body:not(.cust) :is(.down,.badge.down){color:#FF8A70}
/* things that sit on lime stay dark-on-lime in dark mode */
html[data-theme=dark] body:not(.cust) .tk{--ink:#0B1F14;--muted:#2F4538;--up:#0B6B2F;--down:#B2391F;color:#0B1F14}
html[data-theme=dark] body:not(.cust) .tk i{color:#2F4538}
html[data-theme=dark] body:not(.cust) .tk i.up{color:#0B6B2F}
html[data-theme=dark] body:not(.cust) .tk i.down{color:#B2391F}
html[data-theme=dark] body:not(.cust) main .btn.glass,html[data-theme=dark] body:not(.cust) .nvp{--ink:#0B1F14;color:#0B1F14;text-shadow:0 1px 0 rgba(255,255,255,.4)}

/* the phone picture in the hero is a light app screen on purpose: give it its own light colours back */
html[data-theme=dark] body:not(.cust) :is(.w3d,.w3-screen,[class*=w3s]){--ink:#0B1F14;--muted:#5B6B5F;--line:#DCE3D5;--tint:#EEF2E6;--up:#0B6B2F;--down:#B2391F}
/* a lime chip or tab that used the page ink as its background: lime with dark text in dark mode */
html[data-theme=dark] body:not(.cust) .hero h1 em{--ink:#0B1F14;color:#0B1F14;background:#D6F04D}
html[data-theme=dark] body:not(.cust) .pg button[aria-selected=true]{background:#D6F04D;color:#0B1F14;border-color:#D6F04D}
html[data-theme=dark] body:not(.cust) .orb-tip{background:#D6F04D;color:#0B1F14;box-shadow:0 8px 18px -8px rgba(0,0,0,.7)}
html[data-theme=dark] body:not(.cust) .otp-b.on{border-color:#D6F04D;box-shadow:0 0 0 4px rgba(214,240,77,.28),0 10px 20px -12px rgba(0,0,0,.8)}
html[data-theme=dark] body:not(.cust) .otp-b.f{border-color:#D6F04D}
html[data-theme=dark] body:not(.cust) .otp-b.on:not(.f)::after{background:#D6F04D}
html[data-theme=dark] body:not(.cust) .hero .btn.ghost{background:rgba(255,255,255,.07);color:#EAF3E4;border-color:rgba(255,255,255,.4)}
/* the wave that closes the hero: green tints instead of pale paper, so it blends into the dark page */
html[data-theme=dark] body:not(.cust) .hw .a{fill:rgba(46,139,87,.16)}
html[data-theme=dark] body:not(.cust) .hw .b{fill:rgba(46,139,87,.3)}
html[data-theme=dark] body:not(.cust) .hw .c{fill:rgba(18,66,42,.85)}
/* the three tabs laid over the hero photo (Crypto / Forex / Stocks) */
html[data-theme=dark] body:not(.cust) .pg{background:rgba(3,16,10,.78);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.18)}
html[data-theme=dark] body:not(.cust) .pg button:not([aria-selected=true]){color:#EAF3E4}
/* the "how a trend looks" steps: dark panels, the active one picked out in lime */
html[data-theme=dark] body:not(.cust) .tc-steps li{background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.13)}
html[data-theme=dark] body:not(.cust) .tc-steps li.on{background:rgba(214,240,77,.1);border-color:rgba(214,240,77,.55);box-shadow:0 12px 28px -18px rgba(0,0,0,.8)}
html[data-theme=dark] body:not(.cust) .tc-steps li b{color:#EAF3E4}
html[data-theme=dark] body:not(.cust) .tc-steps li span{color:#9DB3A3}
html[data-theme=dark] body:not(.cust) .tc-steps li.on span{color:#CFE0D3}
html[data-theme=dark] body:not(.cust) .tc-steps li i{background:rgba(255,255,255,.1);color:#CFE0D3}
html[data-theme=dark] body:not(.cust) .tc-steps li.on i,html[data-theme=dark] body:not(.cust) .tc-steps li.dn i{background:#D6F04D;color:#0B1F14}
